Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@ module.exports = grammar({
),
),
const: $ => seq('const', field('name', $.word), field('value', $._tc_expr)),
instruction: $ => seq(field('kind', $.word), choice(sep(',', $._expr), repeat($._tc_expr))),

instruction: $ => seq(
field('kind', $.word),
optional(choice(
$._expr,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks like it breaks TC assembly, as you just removed the reference to _tc_expr

sep(',', $._expr)
))
),
_expr: $ => choice($.ptr, $.ident, $.int, $.string, $.float),
ptr: $ =>
choice(
Expand Down