| Crates.io | tree-sitter-applesoft |
| lib.rs | tree-sitter-applesoft |
| version | 5.0.0 |
| created_at | 2021-11-28 17:02:40.705954+00 |
| updated_at | 2025-08-03 20:38:39.647697+00 |
| description | parser for Applesoft BASIC |
| homepage | |
| repository | https://github.com/dfgordon/tree-sitter-applesoft |
| max_upload_size | |
| id | 488893 |
| size | 659,119 |
This is the node binding for tree-sitter-applesoft. See the main README here.
Here is a sample package.json:
{
"name": "parsing-example",
"version": "1.0.0",
"description": "applesoft basic parsing example",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"tree-sitter": "^0.21.1",
"tree-sitter-applesoft": "^4.0.0"
}
}
With an example index.js as follows:
const Parser = require('tree-sitter');
const Applesoft = require('tree-sitter-applesoft');
const basicCode = '10 print "HELLO WORLD!"\n';
const parser = new Parser();
parser.setLanguage(Applesoft);
tree = parser.parse(basicCode);
console.log(tree.rootNode.toString());
This should print the syntax tree
(source_file (line (linenum) (statement (tok_print) (str))))
For more on parsing with node, see the general guidance here.