lezer 0.1.0 copy "lezer: ^0.1.0" to clipboard
lezer: ^0.1.0 copied to clipboard

Dart port of Lezer - an incremental GLR parser system for CodeMirror.

example/lezer_example.dart

import 'package:lezer/lezer.dart';

void main() {
  // Create a simple tree structure
  final nodeSet = NodeSet([
    NodeType.define(id: 0, name: 'Document', top: true),
    NodeType.define(id: 1, name: 'Paragraph'),
  ]);
  
  final tree = Tree(
    nodeSet.types[0],
    [Tree(nodeSet.types[1], [], [], 10)],
    [0],
    10,
  );
  
  print('Tree: $tree');
  print('Top node: ${tree.topNode.name}');
}
0
likes
150
points
57
downloads

Publisher

unverified uploader

Weekly Downloads

Dart port of Lezer - an incremental GLR parser system for CodeMirror.

Repository (GitHub)
View/report issues

Topics

#parser #syntax-highlighting #incremental-parsing #codemirror

Documentation

API reference

License

MIT (license)

Dependencies

meta

More

Packages that depend on lezer