Make compiler read files from stdin
Special "-" file as stdin.
This commit is contained in:
parent
6f069dad84
commit
dca5508d13
3 changed files with 12 additions and 3 deletions
|
|
@ -116,7 +116,7 @@ proc newModule(fileIdx: int32): PSym =
|
|||
result.kind = skModule
|
||||
let filename = fileIdx.toFullPath
|
||||
result.name = getIdent(splitFile(filename).name)
|
||||
if not isNimIdentifier(result.name.s):
|
||||
if result.name.s != "-" and not isNimIdentifier(result.name.s):
|
||||
rawMessage(errInvalidModuleName, result.name.s)
|
||||
|
||||
result.info = newLineInfo(fileIdx, 1, 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue