update abnf

This commit is contained in:
gluax 2022-06-01 08:48:36 -07:00
parent c10eb63575
commit f34f63cea4
5 changed files with 22 additions and 2 deletions

View File

@ -216,7 +216,7 @@ address-type = %s"address"
primitive-type = boolean-type / arithmetic-type / address-type
type = primitive-type
type = primitive-type / identifier
group-coordinate = ( [ "-" ] numeral ) / "+" / "-" / "_"
@ -355,7 +355,7 @@ format-string = *format-string-element
; Input Grammar
; -------------
input-type = type
input-type = primitive-type
input-expression = literal

View File

@ -0,0 +1,5 @@
---
namespace: Compile
expectation: Fail
outputs:
- "Error [ETYC0372003]: Unknown variable `b`\n --> compiler-test:4:14\n |\n 4 | \tlet b: u8 = b;\n | ^\n"

View File

@ -0,0 +1,5 @@
---
namespace: Compile
expectation: Fail
outputs:
- "Error [ETYC0372012]: The function main has no return statement.\n --> compiler-test:3:1\n |\n 3 | function main() -> u8 {}\n | ^^^^^^^^^^^^^^^^^^^^^^^^\n"

View File

@ -0,0 +1,5 @@
---
namespace: Compile
expectation: Fail
outputs:
- "Error [ETYC0372003]: Unknown variable `z`\n --> compiler-test:4:19\n |\n 4 | \tlet b: u8 = 1u8**z;\n | ^\n"

View File

@ -0,0 +1,5 @@
---
namespace: Compile
expectation: Fail
outputs:
- "Error [ETYC0372003]: Unknown variable `x`\n --> compiler-test:4:14\n |\n 4 | \tlet b: u8 = x*z;\n | ^\nError [ETYC0372003]: Unknown variable `z`\n --> compiler-test:4:16\n |\n 4 | \tlet b: u8 = x*z;\n | ^\n"