mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
implements #?braces syntax
This commit is contained in:
@@ -28,15 +28,15 @@ import
|
||||
llstream, lexer, idents, strutils, ast, astalgo, msgs
|
||||
|
||||
type
|
||||
TParser*{.final.} = object # A TParser object represents a module that
|
||||
# is being parsed
|
||||
currInd: int # current indentation level
|
||||
TParser*{.final.} = object # A TParser object represents a file that
|
||||
# is being parsed
|
||||
currInd: int # current indentation level
|
||||
firstTok, strongSpaces: bool # Has the first token been read?
|
||||
# Is strongSpaces on?
|
||||
lex*: TLexer # The lexer that is used for parsing
|
||||
tok*: TToken # The current token
|
||||
inPragma: int # Pragma level
|
||||
inSemiStmtList: int
|
||||
lex*: TLexer # The lexer that is used for parsing
|
||||
tok*: TToken # The current token
|
||||
inPragma*: int # Pragma level
|
||||
inSemiStmtList*: int
|
||||
|
||||
proc parseAll*(p: var TParser): PNode
|
||||
proc closeParser*(p: var TParser)
|
||||
|
||||
1770
compiler/pbraces.nim
1770
compiler/pbraces.nim
File diff suppressed because it is too large
Load Diff
@@ -26,7 +26,7 @@ const
|
||||
"strip"]
|
||||
|
||||
type
|
||||
TParsers*{.final.} = object
|
||||
TParsers* = object
|
||||
skin*: TParserKind
|
||||
parser*: TParser
|
||||
|
||||
@@ -101,9 +101,9 @@ proc parsePipe(filename: string, inputStream: PLLStream): PNode =
|
||||
inc(i, 2)
|
||||
while line[i] in Whitespace: inc(i)
|
||||
var q: TParser
|
||||
openParser(q, filename, llStreamOpen(substr(line, i)))
|
||||
parser.openParser(q, filename, llStreamOpen(substr(line, i)))
|
||||
result = parser.parseAll(q)
|
||||
closeParser(q)
|
||||
parser.closeParser(q)
|
||||
llStreamClose(s)
|
||||
|
||||
proc getFilter(ident: PIdent): TFilterKind =
|
||||
|
||||
Reference in New Issue
Block a user