Comments (3)
I implemented parsing records and enums and your example now looks like this:
int IntTest;
enum EnumTest
{
Begin,
End = 2,
};
struct StructTest{
int MemberTest;
_Static_assert(1, "foo");
};
var: 'int'
name: IntTest
enum_decl_two: 'enum EnumTest'
enum_field_decl: 'int'
name: Begin
enum_field_decl: 'int'
name: End
value:
int_literal: 'int'
value: 2
struct_decl_two: 'struct StructTest'
record_field_decl: 'int'
name: MemberTest
static_assert: 'void'
condition:
int_literal: 'int'
value: 1
diagnostic:
string_literal_expr: '[4]char' lvalue
data: "foo"
I've also improved the test harness and added github actions, so contributing should be easier if you are interested (though plenty of cleanup is still required in Parser
).
from arocc.
Cheers! I've been in the process of sorting out a move IRL so haven't had much time recently for programming in my own time recently - but hopefully will be able to start contributing fairly soon :)
from arocc.
int
is the default type of all variables in C. The reason enums and structs aren't parsed correctly is because they aren't being parsed at all.
from arocc.
Related Issues (20)
- Tokenizer crash
- Typedef crash with duplicated invalid type
- Proposal: add static analyzer to aro HOT 2
- Inactive union field access when diagnosing ignored return value
- Incorrect parse: calling function via statement expression
- Crash: apply vector_size attribute to enum with invalid backing int
- Crash: generic expression value is call to non-existent function
- Crash: cast float to non-existent enum
- Crash: stringize backslashes
- Crash: bitwise XOR
- Crash: assign boolean or result to float HOT 1
- Crash: address of invalid type
- Crash: concatenate different char-size strings with improper encoding
- Crash: assign imaginary float to unsigned
- Crash: record with oversize array HOT 1
- Crash: assign to pointer to incomplete enum
- Enums types with fixed underlying type should compare equal to underlying type
- Fixed-underlying-type enums should enforce non-enum integral underlying type
- Crash: non-evaluated floating point comparison in boolean `or`
- Preprocessor allows extraneous tokens in preprocessor expression
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arocc.