nes-pascal

Compiler diagnostics

Diagnostic codes are part of the compiler’s public API. Once retired, a code must never be assigned to a different diagnostic. Future diagnostics must use the range reserved for their category.

Diagnostic code ranges

Range Category Details
E1000-E1999 Lexical Analysis Lexical diagnostics
E2000-E2999 Parser / Syntax Syntax diagnostics
E3000-E3999 Semantic Analysis Semantic diagnostics
E4000-E4999 Type System Type-system diagnostics
E5000-E5999 Code Generation Code-generation diagnostics
E6000-E6999 Runtime Validation Runtime-validation diagnostics
W1000-W1999 Warnings Reserved; no warnings are emitted
I1000-I1999 Informational Messages Reserved; no informational messages are emitted

Diagnostic index

Code Category Description
E1000 Lexical Analysis Unexpected character
E1002 Lexical Analysis Malformed hexadecimal literal
E2101 Parser / Syntax Unknown command
E2102 Parser / Syntax Invalid syntax
E3001 Semantic Analysis Missing nes.run
E3002 Semantic Analysis Statement after nes.run
E3003 Semantic Analysis Invalid background-color call count
E3004 Semantic Analysis Duplicate symbol
E3005 Semantic Analysis Unknown identifier
E3006 Semantic Analysis Assignment to constant
E3007 Semantic Analysis Unknown assignment target
E3008 Semantic Analysis Variable read before assignment
E3009 Semantic Analysis Runtime command inside conditional
E3010 Semantic Analysis Loop control outside loop
E3011 Semantic Analysis Runtime command inside loop
E3012 Semantic Analysis For control variable modification
E3013 Semantic Analysis Unknown procedure
E3014 Semantic Analysis Recursive procedure call
E3015 Semantic Analysis Runtime command inside procedure
E3016 Semantic Analysis Incorrect procedure argument count
E4001 Type System Unknown type
E4002 Type System Invalid nes_color value
E4003 Type System Invalid byte value
E4004 Type System Incompatible types
E4005 Type System Unsupported parameter type
E5001 Code Generation Missing toolchain
E5002 Code Generation Toolchain failure
E6001 Runtime Validation File access failure

Warnings

The W1000-W1999 range is reserved for future non-fatal compiler warnings. The compiler currently emits no warnings.

Informational messages

The I1000-I1999 range is reserved for future informational diagnostics. The compiler currently emits no informational messages.