feat: improved parsing and regression test suite
This commit is contained in:
parent
4ebdd3c66e
commit
619eb3b338
39 changed files with 1116 additions and 339 deletions
31
testing/regression/syntax/knot-stitches.ink
Normal file
31
testing/regression/syntax/knot-stitches.ink
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
// RUN: %ink-compiler --stdin --compile-only --dump-ast < %s | FileCheck %s
|
||||
|
||||
// CHECK: File "<STDIN>"
|
||||
// CHECK-NEXT: `--KnotDecl <line:26, line:31>
|
||||
// CHECK-NEXT: |--KnotProto <col:1, col:13>
|
||||
// CHECK-NEXT: | `--Identifier `knot` <col:5, col:9>
|
||||
// CHECK-NEXT: |--BlockStmt <line:27, line:27>
|
||||
// CHECK-NEXT: | `--ContentStmt <line:27, col:1:19>
|
||||
// CHECK-NEXT: | `--Content <col:1, col:19>
|
||||
// CHECK-NEXT: | `--StringLiteral `Hello from `knot`!` <col:1, col:19>
|
||||
// CHECK-NEXT: |--StitchDecl <line:28, line:29>
|
||||
// CHECK-NEXT: | |--StitchProto <col:1, col:4>
|
||||
// CHECK-NEXT: | | `--Identifier `a` <col:3, col:4>
|
||||
// CHECK-NEXT: | `--BlockStmt <line:29, line:29>
|
||||
// CHECK-NEXT: | `--ContentStmt <line:29, col:1:21>
|
||||
// CHECK-NEXT: | `--Content <col:1, col:21>
|
||||
// CHECK-NEXT: | `--StringLiteral `Hello from `knot.a`!` <col:1, col:21>
|
||||
// CHECK-NEXT: `--StitchDecl <line:30, line:31>
|
||||
// CHECK-NEXT: |--StitchProto <col:1, col:4>
|
||||
// CHECK-NEXT: | `--Identifier `b` <col:3, col:4>
|
||||
// CHECK-NEXT: `--BlockStmt <line:31, line:31>
|
||||
// CHECK-NEXT: `--ContentStmt <line:31, col:1:21>
|
||||
// CHECK-NEXT: `--Content <col:1, col:21>
|
||||
// CHECK-NEXT: `--StringLiteral `Hello from `knot.b`!` <col:1, col:21>
|
||||
|
||||
=== knot ===
|
||||
Hello from `knot`!
|
||||
= a
|
||||
Hello from `knot.a`!
|
||||
= b
|
||||
Hello from `knot.b`!
|
||||
Loading…
Add table
Add a link
Reference in a new issue