GithubHelp home page GithubHelp logo

Comments (3)

Vexu avatar Vexu commented on July 19, 2024 1

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.

moosichu avatar moosichu commented on July 19, 2024 1

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.

Vexu avatar Vexu commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.