Commit Graph

5 Commits

Author SHA1 Message Date
Christian Rinderknecht
ce5464f9af The preprocessor library depends now on the kinds of comments
instead of a closed set of languages. I also removed the offsets:
I simply use the current region to determine whether the
preprocessing directie starts at the beginning of a line. I also
removed scanning line indicators, to make the lexer simpler.
2020-04-24 20:54:13 +02:00
Christian Rinderknecht
3ed303f60d In EvalOpt modules, the CLI input ["-"] is becomes now [None],
like the absence of an input filename. (This simplifies all the
clients codes.) Fixed the dune file for the preprocessor. Fixed
the build of PreprocMain.exe and PreprocMain.byte. Restricted
preprocessing errors [Preproc.Newline_in_string] and
[Preproc.Open_string] to the argument of the #include
directive (instead of general strings: this is for the LIGO lexer
to report the error). I removed the error [Preproc.Open_comment]
as this is for the LIGO lexer to report. The preprocessor scanner
[Preproc.lex] does not take a parameter [is_file:bool] now: the
source file (if any) is determined from the lexing
buffer. Accordingly, the field [is_file] of the state of the
preprocessing lexer has been removed: the lexing buffer becomes
now the reference for the input source (bug fix and interface
improvement). Fixed the comments of the test contract
pledge.religo. I removed the data constructor [Lexer.Stdin], as
redundant with [Lexer.Channel].
2020-04-09 16:18:26 +02:00
Christian Rinderknecht
46eecb4027 Marked the errors that should be skipped (because catched by the
LIGO lexer later). Added field [is_file] to the state of the
lexer to know if the input is a file or not (insert or not a
first line directive). Fixed ReasonLIGO comments in
entrypoints-contracts.md and website2.religo. WIP on the LIGO
lexer to properly handle comments for all the syntaxes.
2020-04-08 20:24:34 +02:00
Christian Rinderknecht
6c1a1f91e2 Removed error "Invalid directive" as PascaLIGO has the operator #. 2020-04-03 19:06:35 +02:00
Christian Rinderknecht
968e73b342 Integrated the library for preprocessing.
The build with Makefile works. Dune build to be tested.
2020-03-31 19:44:10 +02:00