Big compiler Cleanup (#14777)

This commit is contained in:
Clyybber
2020-08-28 22:18:09 +02:00
committed by GitHub
parent f8c48fc186
commit 13e659cfec
53 changed files with 481 additions and 783 deletions

View File

@@ -16,8 +16,8 @@ proc checkGrammarFileImpl(cache: IdentCache, config: ConfigRef) =
if stream != nil:
declaredSyms.incl "section" # special case for 'section(RULE)' in the grammar
var
L: TLexer
tok: TToken
L: Lexer
tok: Token
initToken(tok)
openLexer(L, f, stream, cache, config)
# load the first token:

View File

@@ -195,8 +195,7 @@ proc processCmdLine*(pass: TCmdLinePass, cmd: string; conf: ConfigRef) =
of cmdArgument:
let info = p.key.split(':')
if info.len == 3:
let (dir, file, ext) = info[0].splitFile()
conf.projectName = findProjectNimFile(conf, dir)
conf.projectName = findProjectNimFile(conf, info[0].splitFile.dir)
if conf.projectName.len == 0: conf.projectName = info[0]
try:
conf.m.trackPos = newLineInfo(conf, AbsoluteFile info[0],