(llvm) types and blocks are parsed incorrectly
See original GitHub issueDescribe the issue
The LLVM types and blocks are parsed incorrectly.
Which language seems to have the issue? LLVM
Are you using highlight
or highlightAuto
?
No
Sample Code to Reproduce
;; foooo
define i32 @mul_add(i32 %x, i32 %y, i32 %z) {
entry:
%tmp = mul i32 %x, %y
%tmp2 = add i32 %tmp, %z
%tmp3 = add i32 %tmp, 0
ret i32 %tmp3
}
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) - all the
%...
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 comment
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
LLVM Language Reference Manual
Abstract¶. This document is a reference manual for the LLVM assembly language. LLVM is a Static Single Assignment (SSA) based representation that provides ......
Read more >How to parse llvm bitcode block 2 - Stack Overflow
Currently, I'm writing an LLVM bitcode parser just for fun, however, I've run into an issue where the parser just throws an error...
Read more >llvm-project/ParseDecl.cpp at main - clang - GitHub
a type, it is parsed as an identifier. If the attribute actually. /// wanted an expression, it's out of luck (but it turns...
Read more >2022 Changelog | ClickHouse Docs
In this format, ClickHouse formats/parses each row as a separate BSON document ... Fix LOGICAL_ERROR Arguments of 'plus' have incorrect data types which...
Read more >Zig Language Reference
In Zig, a function's block of statements and expressions are surrounded by an ... Using the incorrect -target or -cflags could result in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed.
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.