diff options
Diffstat (limited to 'compiler')
-rwxr-xr-x | compiler/main.nim | 2 | ||||
-rwxr-xr-x | compiler/msgs.nim | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/compiler/main.nim b/compiler/main.nim index 11a139144..bd429cad9 100755 --- a/compiler/main.nim +++ b/compiler/main.nim @@ -56,7 +56,7 @@ proc newModule(filename: string): PSym = result.kind = skModule result.name = getIdent(splitFile(filename).name) if not isNimrodIdentifier(result.name.s): - rawMessage(errIdentifierExpected, result.name.s) + rawMessage(errInvalidModuleName, result.name.s) result.owner = result # a module belongs to itself result.info = newLineInfo(filename, 1, 1) diff --git a/compiler/msgs.nim b/compiler/msgs.nim index 97d4179da..56fe88a9f 100755 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -19,6 +19,7 @@ type errTabulatorsAreNotAllowed, errInvalidToken, errLineTooLong, errInvalidNumber, errNumberOutOfRange, errNnotAllowedInCharacter, errClosingBracketExpected, errMissingFinalQuote, errIdentifierExpected, + errInvalidModuleName, errOperatorExpected, errTokenExpected, errStringAfterIncludeExpected, errRecursiveDependencyX, errOnOrOffExpected, errNoneSpeedOrSizeExpected, errInvalidPragma, errUnknownPragma, errInvalidDirectiveX, @@ -119,6 +120,7 @@ const errClosingBracketExpected: "closing ']' expected, but end of file reached", errMissingFinalQuote: "missing final \'", errIdentifierExpected: "identifier expected, but found \'$1\'", + errInvalidModuleName: "invalid module name: '$1'", errOperatorExpected: "operator expected, but found \'$1\'", errTokenExpected: "\'$1\' expected", errStringAfterIncludeExpected: "string after \'include\' expected", |