Fixed helpers.ml and promoted negative test of reserved name for PascaLIGO.
This commit is contained in:
parent
d46d95ee90
commit
a2a35cc953
@ -99,9 +99,9 @@ ligo: lexer error: Negative byte sequence.
|
||||
|
||||
run_ligo_bad [ "compile-contract" ; "../../test/lexer/reserved_name.ligo" ; "main" ] ;
|
||||
[%expect {|
|
||||
ligo: lexer error: Reserved name: args.
|
||||
ligo: lexer error: Reserved name: arguments.
|
||||
Hint: Change the name.
|
||||
{"parser_loc":"in file \"reserved_name.ligo\", line 1, characters 4-8"}
|
||||
{"parser_loc":"in file \"reserved_name.ligo\", line 1, characters 4-13"}
|
||||
|
||||
|
||||
If you're not sure how to fix this error, you can
|
||||
|
@ -134,27 +134,27 @@ let parsify_string = fun (syntax : v_syntax) source_filename ->
|
||||
let%bind applied = Self_ast_simplified.all_program parsified in
|
||||
ok applied
|
||||
|
||||
let pretty_print_pascaligo = fun source ->
|
||||
let pretty_print_pascaligo = fun source ->
|
||||
let%bind ast = Parser.Pascaligo.parse_file source in
|
||||
let buffer = Buffer.create 59 in
|
||||
let state = Parser.Pascaligo.ParserLog.mk_state
|
||||
let state = Parser_pascaligo.ParserLog.mk_state
|
||||
~offsets:true
|
||||
~mode:`Byte
|
||||
~buffer in
|
||||
Parser.Pascaligo.ParserLog.pp_ast state ast;
|
||||
Parser_pascaligo.ParserLog.pp_ast state ast;
|
||||
ok buffer
|
||||
|
||||
let pretty_print_cameligo = fun source ->
|
||||
let pretty_print_cameligo = fun source ->
|
||||
let%bind ast = Parser.Cameligo.parse_file source in
|
||||
let buffer = Buffer.create 59 in
|
||||
let state = Parser.Cameligo.ParserLog.mk_state
|
||||
let state = Parser_cameligo.ParserLog.mk_state
|
||||
~offsets:true
|
||||
~mode:`Byte
|
||||
~buffer in
|
||||
Parser.Cameligo.ParserLog.pp_ast state ast;
|
||||
ok buffer
|
||||
|
||||
let pretty_print_reasonligo = fun source ->
|
||||
let pretty_print_reasonligo = fun source ->
|
||||
let%bind ast = Parser.Reasonligo.parse_file source in
|
||||
let buffer = Buffer.create 59 in
|
||||
let state = Parser.Reasonligo.ParserLog.mk_state
|
||||
@ -170,4 +170,4 @@ let pretty_print = fun syntax source_filename ->
|
||||
| Pascaligo -> pretty_print_pascaligo
|
||||
| Cameligo -> pretty_print_cameligo
|
||||
| ReasonLIGO -> pretty_print_reasonligo)
|
||||
source_filename
|
||||
source_filename
|
||||
|
Loading…
Reference in New Issue
Block a user