diff options
| author | Joey Yakimowich-Payne <jyapayne@gmail.com> | 2020-05-14 17:23:43 -0600 |
|---|---|---|
| committer | genotrance <dev@genotrance.com> | 2020-05-15 11:20:00 -0500 |
| commit | ffd6b9b5eb6be220b05178438aa622cda047d9d5 (patch) | |
| tree | bf05b0ddf06c67cba17e25b0cf2e98d472c42fa3 | |
| parent | faab2924c8a6a48df65a4ee74363eb822c2c768f (diff) | |
| download | nimterop-ffd6b9b5eb6be220b05178438aa622cda047d9d5.tar.gz nimterop-ffd6b9b5eb6be220b05178438aa622cda047d9d5.zip | |
Rename currentExprSkipIdentValidation -> skipIdentValidation
| -rw-r--r-- | nimterop/exprparser.nim | 8 | ||||
| -rw-r--r-- | nimterop/globals.nim | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/nimterop/exprparser.nim b/nimterop/exprparser.nim index e5e2150..b089fd2 100644 --- a/nimterop/exprparser.nim +++ b/nimterop/exprparser.nim @@ -45,14 +45,14 @@ proc getExprIdent*(gState: State, identName: string, kind = nskConst, parent = " ## ## Returns PNode(nkNone) if the identifier is blank result = newNode(nkNone) - if gState.currentExprSkipIdentValidation or identName notin gState.skippedSyms: + if gState.skipIdentValidation or identName notin gState.skippedSyms: var ident = identName if ident != "_": # Process the identifier through cPlugin ident = gState.getIdentifier(ident, kind, parent) if kind == nskType: result = gState.getIdent(ident) - elif gState.currentExprSkipIdentValidation or ident.nBl and ident in gState.constIdentifiers: + elif gState.skipIdentValidation or ident.nBl and ident in gState.constIdentifiers: if gState.currentTyCastName.nBl: ident = ident & "." & gState.currentTyCastName result = gState.getIdent(ident) @@ -611,7 +611,7 @@ proc parseCExpression*(gState: State, code: string, name = "", skipIdentValidati ## Convert the C string to a nim PNode tree gState.currentExpr = code gState.currentTyCastName = name - gState.currentExprSkipIdentValidation = skipIdentValidation + gState.skipIdentValidation = skipIdentValidation withCodeAst(gState.currentExpr, gState.mode): result = gState.parseCExpression(root) @@ -619,4 +619,4 @@ proc parseCExpression*(gState: State, code: string, name = "", skipIdentValidati # Clear the state gState.currentExpr = "" gState.currentTyCastName = "" - gState.currentExprSkipIdentValidation = false
\ No newline at end of file + gState.skipIdentValidation = false
\ No newline at end of file diff --git a/nimterop/globals.nim b/nimterop/globals.nim index 039dd3c..05284a9 100644 --- a/nimterop/globals.nim +++ b/nimterop/globals.nim @@ -116,7 +116,7 @@ type currentExpr*, currentTyCastName*: string # Controls whether or not the current expression # should validate idents against currently defined idents - currentExprSkipIdentValidation*: bool + skipIdentValidation*: bool # Legacy AST fields, remove when ast2 becomes default constStr*, enumStr*, procStr*, typeStr*: string |
