Skip to content

Conversation

@Ra77a3l3-jar
Copy link

Summary

This PR adds tree-sitter grammar support for BASIC and FreeBASIC languages.

Changes

Testing

Tested with hx --health basic and hx --health freebasic:

  • ✅ Tree-sitter parser loads correctly
  • ✅ Highlight queries work
  • ✅ Indent queries work
  • ✅ Textobject queries work
  • ✅ Tags queries work

Ran tests as per contribution guidelines:

  • cargo test --workspace
  • cargo integration-test

Notes

  • Both languages share the .bas file extension but can be distinguished by content
  • FreeBASIC additionally supports .bi (include) files

Remove invalid node references from query files:
- basic: Remove while_statement, do_statement, function_definition, sub_definition, and if_statement (only for_statement is supported)
- freebasic: Remove if_statement (not used for indentation in this grammar)
FreeBASIC grammar supports multi-line IF...THEN...END IF blocks
that should be indented properly.
@Ra77a3l3-jar Ra77a3l3-jar force-pushed the basic-freebasic-tree-sitter branch 2 times, most recently from b569590 to 34c04b7 Compare November 2, 2025 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant