New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(llvm) types and blocks are parsed incorrectly #2782
Comments
Why is 0 a literal and not a number? Tagging beginner friendly.
Many styles make almost a "subtheme" for Markdown (which is most often where Are these truly called "blocks" in LLVM? |
I see string are permittable (in the grammar)... is an empty string allowed? ie, |
Ping. |
1 similar comment
Ping. |
The closest thing I can find about ; Named metadata
!0 = !{i32 42, null, !"string"}
!foo = !{!0} With PR #2830, I see the following difference in our highlight: |
Thanks for that example. That looks wrong. I’m also not sure I’d call that a literal though. But it seems perhaps the exclamation rule should come before the number rule. ; Some unnamed metadata nodes, which are referenced by the named metadata.
!0 = !{!"zero"}
!1 = !{!"one"}
!2 = !{!"two"}
; A named metadata.
!name = !{!0, !1, !2} |
Yea, I wouldn't call it a literal either. That usage is the closest thing I could find to it being considered something other than a number. |
Fixed. |
Describe the issue
The LLVM types and blocks are parsed incorrectly.
Which language seems to have the issue?
LLVM
Are you using
highlight
orhighlightAuto
?No
Sample Code to Reproduce
Expected behavior
I expect:
define
to be a.hljs-keyword
i32
to be a.hljs-type
(its parsed as a keyword, all types are described here: https://llvm.org/docs/LangRef.html#type-system)@mul_add
to be a.hljs-title
(its a function name)%...
to be.hljs-symbol
0
to be a.hljs-literal
mul
,add
,ret
to be.hljs-built_in
or.hljs-keyword
(these are parsed as keywords)entry:
is a block, so i'd expect this to be maybe a.hljs-section
? not sure;; fooo
to be a commentThe text was updated successfully, but these errors were encountered: