Skip to content

Comments

line comment doesn't show for single instruction#13

Open
amanuel2 wants to merge 1 commit intoRubixDev:mainfrom
amanuel2:main
Open

line comment doesn't show for single instruction#13
amanuel2 wants to merge 1 commit intoRubixDev:mainfrom
amanuel2:main

Conversation

@amanuel2
Copy link

Fix #12

For file:

inc %edi #comment2

Previous parse:

(program [0, 0] - [1, 0]
  (instruction [0, 0] - [0, 18]
    kind: (word [0, 0] - [0, 3])
    (ident [0, 4] - [0, 8]
      (reg [0, 4] - [0, 8]))
    (int [0, 9] - [0, 10])
    (ident [0, 10] - [0, 18]
      (reg [0, 10] - [0, 18]
        (word [0, 10] - [0, 18])))))

After this PR:

(program [0, 0] - [1, 0]
  (instruction [0, 0] - [0, 8]
    kind: (word [0, 0] - [0, 3])
    (ident [0, 4] - [0, 8]
      (reg [0, 4] - [0, 8])))
  (line_comment [0, 9] - [0, 18]))

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sometimes comments are not rendered correctly in gnu assembler

2 participants