first implementation of suggest

This commit is contained in:
Araq 2011-02-16 02:24:12 +01:00
commit f7b2d71790
12 changed files with 54 additions and 25 deletions

View file

@ -176,6 +176,11 @@ proc CommandScan(filename: string) =
else:
rawMessage(errCannotOpenFile, f)
proc CommandSuggest(filename: string) =
msgs.gErrorMax = high(int) # do not stop after first error
semanticPasses()
compileProject(filename)
proc WantFile(filename: string) =
if filename == "":
Fatal(newLineInfo("command line", 1, 1), errCommandExpectsFilename)
@ -265,5 +270,9 @@ proc MainCommand(cmd, filename: string) =
of wI:
gCmd = cmdInteractive
CommandInteractive()
of wSuggest:
gCmd = cmdSuggest
wantFile(filename)
CommandSuggest(filename)
else: rawMessage(errInvalidCommandX, cmd)