Rename currentExprSkipIdentValidation -> skipIdentValidation
This commit is contained in:
parent
8962a85152
commit
98beef2997
2 changed files with 5 additions and 5 deletions
|
|
@ -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
|
||||
gState.skipIdentValidation = false
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue