ligo/vendors/Preprocessor
Christian Rinderknecht 34b9ee14da [Bug fix] Case #include followed by newline or eof.
I added cases for scanning eof (followed by a rollback).
2020-05-15 21:23:49 +02:00
..
2020-04-29 19:40:04 +01:00

A preprocessor a la C# in OCaml

The following preprocessing directives are supported

  • #define
  • #elif
  • #else
  • #endif
  • #endregion
  • #error
  • #if
  • #include
  • #region
  • #undef

Note: Because it is meant for LIGO, there is no error raised for invalid preprocessing directives, as the symbol # is valid in PascaLIGO (cons operator for lists). Also, the preprocessor may report an error on some weird but valid PascaLIGO contracts, like

const include : list (int) = list [1] const l : list (int) = 0

include