1.1.1 • Published 1 month ago

tree-sitter-integerbasic v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Parser for Integer BASIC

This is the node binding for tree-sitter-integerbasic. See the main README here.

Here is a sample package.json:

{
  "name": "parsing-example",
  "version": "1.0.0",
  "description": "integer basic parsing example",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "node-gyp": "^10.1.0",
    "tree-sitter": "^0.21.1",
    "tree-sitter-integerbasic": "^1.1.1"
  }
}

With an example index.js as follows:

const Parser = require('tree-sitter');
const Integer = require('tree-sitter-integerbasic');

const code = '10 print "HELLO WORLD!"\n';
const parser = new Parser();
parser.setLanguage(Integer);
tree = parser.parse(code);
console.log(tree.rootNode.toString());

This should print the syntax tree

(source_file (line (linenum) (statement (statement_print_str) (string (quote) (unquote)))))

For more on parsing with node, see the general guidance here.

1.1.1

1 month ago

1.1.0

1 month ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago