Remove closure pragmas

This commit is contained in:
Ganesh Viswanathan 2018-12-26 20:24:17 -06:00
commit 9cddef831d
2 changed files with 9 additions and 9 deletions

View file

@ -15,7 +15,7 @@ type
name*: string name*: string
kind*: Kind kind*: Kind
children*: seq[ref Ast] children*: seq[ref Ast]
tonim*: proc (ast: ref Ast, node: TSNode) {.closure, locks: 0.} tonim*: proc (ast: ref Ast, node: TSNode)
regex*: Regex regex*: Regex
State* = object State* = object
@ -30,7 +30,7 @@ type
ast*: Table[string, seq[ref Ast]] ast*: Table[string, seq[ref Ast]]
data*: seq[tuple[name, val: string]] 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 var
gStateCT* {.compiletime.}: State gStateCT* {.compiletime.}: State

View file

@ -14,7 +14,7 @@ proc initGrammar() =
(preproc_arg) (preproc_arg)
) )
""", """,
proc (ast: ref Ast, node: TSNode) {.closure, locks: 0.} = proc (ast: ref Ast, node: TSNode) =
let let
name = gStateRT.data[0].val.getIdentifier() name = gStateRT.data[0].val.getIdentifier()
val = gStateRT.data[1].val.getLit() 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 var
name = gStateRT.data[1].val.getIdentifier() name = gStateRT.data[1].val.getIdentifier()
typ = gStateRT.data[0].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) pStructCommon(ast, node, gStateRT.data[0].val, 1, 1)
)) ))
@ -161,7 +161,7 @@ proc initGrammar() =
(type_identifier) (type_identifier)
) )
""", """,
proc (ast: ref Ast, node: TSNode) {.closure, locks: 0.} = proc (ast: ref Ast, node: TSNode) =
var var
offset = 0 offset = 0
@ -210,7 +210,7 @@ proc initGrammar() =
) )
) )
""", """,
proc (ast: ref Ast, node: TSNode) {.closure, locks: 0.} = proc (ast: ref Ast, node: TSNode) =
var var
name = "" name = ""
offset = 0 offset = 0
@ -240,7 +240,7 @@ proc initGrammar() =
(type_identifier) (type_identifier)
) )
""", """,
proc (ast: ref Ast, node: TSNode) {.closure, locks: 0.} = proc (ast: ref Ast, node: TSNode) =
var var
offset = 0 offset = 0
@ -309,7 +309,7 @@ proc initGrammar() =
) )
) )
""", """,
proc (ast: ref Ast, node: TSNode) {.closure, locks: 0.} = proc (ast: ref Ast, node: TSNode) =
let let
ftyp = gStateRT.data[0].val.getIdentifier() ftyp = gStateRT.data[0].val.getIdentifier()
fname = gStateRT.data[1].val fname = gStateRT.data[1].val