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" ] ;
|
run_ligo_bad [ "compile-contract" ; "../../test/lexer/reserved_name.ligo" ; "main" ] ;
|
||||||
[%expect {|
|
[%expect {|
|
||||||
ligo: lexer error: Reserved name: args.
|
ligo: lexer error: Reserved name: arguments.
|
||||||
Hint: Change the name.
|
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
|
If you're not sure how to fix this error, you can
|
||||||
|
@ -137,17 +137,17 @@ let parsify_string = fun (syntax : v_syntax) source_filename ->
|
|||||||
let pretty_print_pascaligo = fun source ->
|
let pretty_print_pascaligo = fun source ->
|
||||||
let%bind ast = Parser.Pascaligo.parse_file source in
|
let%bind ast = Parser.Pascaligo.parse_file source in
|
||||||
let buffer = Buffer.create 59 in
|
let buffer = Buffer.create 59 in
|
||||||
let state = Parser.Pascaligo.ParserLog.mk_state
|
let state = Parser_pascaligo.ParserLog.mk_state
|
||||||
~offsets:true
|
~offsets:true
|
||||||
~mode:`Byte
|
~mode:`Byte
|
||||||
~buffer in
|
~buffer in
|
||||||
Parser.Pascaligo.ParserLog.pp_ast state ast;
|
Parser_pascaligo.ParserLog.pp_ast state ast;
|
||||||
ok buffer
|
ok buffer
|
||||||
|
|
||||||
let pretty_print_cameligo = fun source ->
|
let pretty_print_cameligo = fun source ->
|
||||||
let%bind ast = Parser.Cameligo.parse_file source in
|
let%bind ast = Parser.Cameligo.parse_file source in
|
||||||
let buffer = Buffer.create 59 in
|
let buffer = Buffer.create 59 in
|
||||||
let state = Parser.Cameligo.ParserLog.mk_state
|
let state = Parser_cameligo.ParserLog.mk_state
|
||||||
~offsets:true
|
~offsets:true
|
||||||
~mode:`Byte
|
~mode:`Byte
|
||||||
~buffer in
|
~buffer in
|
||||||
|
Loading…
Reference in New Issue
Block a user