diff options
| author | Ganesh Viswanathan <dev@genotrance.com> | 2018-12-26 20:24:17 -0600 |
|---|---|---|
| committer | Ganesh Viswanathan <dev@genotrance.com> | 2018-12-26 20:24:17 -0600 |
| commit | 9cddef831de594ebc9f72babcdfdf45a4fba87f5 (patch) | |
| tree | b828dd06e61e3835fa84e12ceb5464ec8011ad8d | |
| parent | e59e34a7be12c7f84099d8b56b038d3c3ab9c15c (diff) | |
| download | nimterop-9cddef831de594ebc9f72babcdfdf45a4fba87f5.tar.gz nimterop-9cddef831de594ebc9f72babcdfdf45a4fba87f5.zip | |
Remove closure pragmas
| -rw-r--r-- | nimterop/globals.nim | 4 | ||||
| -rw-r--r-- | nimterop/grammar.nim | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/nimterop/globals.nim b/nimterop/globals.nim index c4fe8ad..9ad2b99 100644 --- a/nimterop/globals.nim +++ b/nimterop/globals.nim @@ -15,7 +15,7 @@ type name*: string kind*: Kind children*: seq[ref Ast] - tonim*: proc (ast: ref Ast, node: TSNode) {.closure, locks: 0.} + tonim*: proc (ast: ref Ast, node: TSNode) regex*: Regex State* = object @@ -30,7 +30,7 @@ type ast*: Table[string, seq[ref Ast]] data*: seq[tuple[name, val: string]] - grammar*: seq[tuple[grammar: string, call: proc(ast: ref Ast, node: TSNode) {.locks: 0.}]] + grammar*: seq[tuple[grammar: string, call: proc(ast: ref Ast, node: TSNode) {.nimcall.}]] var gStateCT* {.compiletime.}: State diff --git a/nimterop/grammar.nim b/nimterop/grammar.nim index 90aff2f..26ce7f0 100644 --- a/nimterop/grammar.nim +++ b/nimterop/grammar.nim @@ -14,7 +14,7 @@ proc initGrammar() = (preproc_arg) ) """, - proc (ast: ref Ast, node: TSNode) {.closure, locks: 0.} = + proc (ast: ref Ast, node: TSNode) = let name = gStateRT.data[0].val.getIdentifier() val = gStateRT.data[1].val.getLit() @@ -43,7 +43,7 @@ proc initGrammar() = ) ) """, - proc (ast: ref Ast, node: TSNode) {.closure, locks: 0.} = + proc (ast: ref Ast, node: TSNode) = var name = gStateRT.data[1].val.getIdentifier() typ = gStateRT.data[0].val.getIdentifier() @@ -125,7 +125,7 @@ proc initGrammar() = ) ) """, - proc (ast: ref Ast, node: TSNode) {.closure, locks: 0.} = + proc (ast: ref Ast, node: TSNode) = pStructCommon(ast, node, gStateRT.data[0].val, 1, 1) )) @@ -161,7 +161,7 @@ proc initGrammar() = (type_identifier) ) """, - proc (ast: ref Ast, node: TSNode) {.closure, locks: 0.} = + proc (ast: ref Ast, node: TSNode) = var offset = 0 @@ -210,7 +210,7 @@ proc initGrammar() = ) ) """, - proc (ast: ref Ast, node: TSNode) {.closure, locks: 0.} = + proc (ast: ref Ast, node: TSNode) = var name = "" offset = 0 @@ -240,7 +240,7 @@ proc initGrammar() = (type_identifier) ) """, - proc (ast: ref Ast, node: TSNode) {.closure, locks: 0.} = + proc (ast: ref Ast, node: TSNode) = var offset = 0 @@ -309,7 +309,7 @@ proc initGrammar() = ) ) """, - proc (ast: ref Ast, node: TSNode) {.closure, locks: 0.} = + proc (ast: ref Ast, node: TSNode) = let ftyp = gStateRT.data[0].val.getIdentifier() fname = gStateRT.data[1].val |
