Skip to content

Releases: c3lang/tree-sitter-c3

v0.8.1

03 Jul 08:10
Compare
Choose a tag to compare

0.8.1

Grammar updates for C3 0.7.3.

  • Update $assert and $error grammar
  • Added d type suffix for real literals
  • Allow var $Type = <expr> (remove type requirement)
  • Allow $Type = <expr> (remove type requirement)
  • Allow $assignable(<expr>, <expr>) (remove type requirement)

v0.8.0

27 May 13:00
Compare
Choose a tag to compare

End of major breaking changes for a while.

0.8.0

  • Split builtin into builtin_const and builtin (callable)
  • Added field name description to doc_comment_contract
  • Added path_type_ident, encapsulating module path and path_ident
  • Added ident_expr, encapsulating module path and [(const_ident) (ident) (at_ident)] or [(ct_ident) (hash_ident)]
  • Removed module_type_ident
  • Removed module_ident_expr
  • Renamed enum_param_declaration -> enum_param
  • Renamed arg -> initializer_element

v0.7.0

26 May 12:47
Compare
Choose a tag to compare

0.7.0

  • Removed base_type
  • Removed local_decl_storage
  • Removed global_storage
  • Removed decl_after_type
  • Removed declaration_stmt (const_declaration) in favor of const_declaration
  • declaration_stmt changed to contain declaration or const_declaration
  • global_declaration changed to contain declaration, const_declaration or func_declaration
  • Declarations are now in the form (declaration name: ([(ident) (ct_ident)])) or (declaration (identifier_list))
  • Use paren_expr in more places
  • $vaarg[..], $vaexpr[..], $vaconst[..] is now a subscript_expr
  • Moved for (...) parenthesis from for_stmt into for_cond
  • Added ct_for_cond
  • Renamed module -> module_declaration
  • Renamed var_decl -> var_declaration
  • Renamed attr_param -> attribute_param
  • Renamed generic_params -> generic_param_list
  • Renamed generic_arguments -> generic_arg_list
  • Renamed parameter_default -> param_default
  • Renamed parameter -> param
  • Renamed attr_param -> attribute_arg
  • Renamed fn_parameter_list -> func_param_list
  • Renamed macro_parameter_list -> macro_param_list
  • Renamed enum_parameter_list -> enum_param_list
  • Added attribute_arg_list
  • Added call_arg_list
  • Removed call_invocation in favor of call_arg_list
  • Removed path_type_ident in favor of type_ident and module_type_ident
  • Removed interface node
  • Renamed interface_impl -> interface_impl_list
  • Removed path_const_ident
  • Relaxed @return? parsing
  • Added indents.scm

v0.6.0

20 May 12:29
Compare
Choose a tag to compare

0.6.0

  • Added parsing of doc comment contracts (#33)
  • Added ll/ull integer suffix
  • Removed alias_path_ident and alias_path_at_ident
  • Removed typeid token for access_ident (now resolved as ident)
  • Rule param_path_element now expects an access_ident after . instead of a base expression
  • Relaxed and refactored alias declaration
  • Improved parsing of byte literals
  • Allow parenthesis for types where expressions are expected
  • Allow parenthesis for field/type access expressions
  • Type.CONST now parses as (type_access_expr type: (...) field: (access_ident (const_ident))) (const_ident is wrapped by access_ident for the field)
  • Fixed generic type method alias (alias foo = Type{int}.method)
  • Fixed not parsing named type $Foo: and hash #foo: arguments
  • Fixed $defined(Type) error
  • Fixed not parsing interface parents
  • Fixed alias foo = Type[].method
  • Fixed function signature not allowing attributes
  • Fixed negative asm integer/real literals
  • Fixed 0.5.3 regression: Resolve parameter $Type as (type (base_type (ct_type_ident))) again ($Type ident is a valid parameter for lambda functions in macros)
  • Fixed not parsing attributes for bitstruct members
  • Fixed $vasplat in initializer lists
  • Fixed tree-sitter reporting an error when a block comment ends with EOF due to missing an expected token

v0.5.3

02 May 09:38
Compare
Choose a tag to compare

0.5.3

  • Fixed parsing of macro foo($Type = Type) (default argument of type parameter)
  • Resolve parameter $Type of macro foo($Type) as (ct_type_ident) instead of (type (base_type (ct_type_ident)))

v0.5.2

29 Apr 14:08
Compare
Choose a tag to compare

0.5.2

  • Added rule ct_else_stmt encapsulating $else blocks
  • Updated queries

v0.5.1

29 Apr 10:29
Compare
Choose a tag to compare

0.5.1

  • Parse @operator overloads
  • Added rule overload_operator
  • Added field name to alias_declaration
  • Fixed not parsing attributes for faultdef

v0.5.0

18 Mar 10:31
Compare
Choose a tag to compare

0.5.0

Preliminary grammar for C3 0.7.

  • Updated syntax for C3 0.7
  • Added rule generic_type_ident, wrapping type_ident/module_type_ident and generic_arguments
  • Added attrdef_declaration + attribute_list
  • define_path_ident -> alias_path_ident
  • define_path_at_ident -> alias_path_at_ident
  • fault_declaration -> faultdef_declaration
  • define_declaration -> alias_declaration
  • distinct_declaration -> typedef_declaration
  • Renamed func_typedef -> func_signature
  • Removed typedef_type, now inlined into alias_declaration
  • Removed define_ident, now inlined into alias_declaration
  • Removed define_attribute

v0.4.1

16 Mar 17:59
Compare
Choose a tag to compare

0.4.1

Changes

  • Fixed enum Foo : Bar {} and bitstruct Foo : Bar {} (conflict with new generics syntax)
  • Added missing defer (catch ...) syntax

v0.4.0

04 Mar 09:50
Compare
Choose a tag to compare

0.4.0

Changes

  • Switch to new generics syntax
  • Removed Type {...} grammar
  • Added rule typed_initializer_list for (Type) {...} with precedence over cast