mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
Big compiler Cleanup (#14777)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user