slackhq / tree-sitter-hack

Hack grammar for tree-sitter
MIT License
33 stars 16 forks source link

Add the primitive types `num`, `nothing` and `resource` #40

Closed Wilfred closed 1 year ago

Wilfred commented 2 years ago

Summary

These types were previously missing from the list of primitive types.

I've also added a test.

Requirements (place an x in each [ ])

frankeld commented 2 years ago

Hi @Wilfred - Thanks for addressing these built-in types! It seems like something is off with the tests, as I would expect the .exp file to look more like this for each type as outputted by our test script:

(script
  (expression_statement
    (is_expression
      left: (variable)
      right: (type_specifier))))

Regardless, it would be great for these types to join our other built-in types/keywords in /slackhq/tree-sitter-hack/blob/main/test/cases/declarations/const-keyword.hack. Feel free to reach out if I can help at all!

salesforce-cla[bot] commented 1 year ago

Thanks for the contribution! Before we can merge this, we need @Wilfred @4e554c4c to sign the Salesforce Inc. Contributor License Agreement.

salesforce-cla[bot] commented 1 year ago

Thanks for the contribution! Before we can merge this, we need @Wilfred to sign the Salesforce Inc. Contributor License Agreement.