nes-pascal

Compiler pipeline

English Português (Brasil)

The compiler pipeline is deliberately separated:

.nsp source + optional CHR-ROM, metasprite JSON, and nametable assets
  -> lexer
  -> parser
  -> AST
  -> semantic validation, name resolution, and type checking
  -> resolved AST
  -> validated CPU memory layout
  -> ca65 backend
  -> ca65
  -> ld65
  -> ROM

Components

The linker configuration is generated from the same immutable layout object used by the backend and map writer. There is no separately maintained static NROM linker file or duplicate RAM-address calculation.

Source text is not translated directly to Assembly with string replacement. The compiler uses explicit parsed and resolved AST nodes between parsing and code generation.

Ordinary source errors are displayed without a Python stack trace and include an error code, file, line, column, source excerpt, and correction hint when useful. See the diagnostics reference.