⚠ nodes in tree

Hello, I’m trying to create a RegularExpression parser and everything seems to be working correctly but i have nodes of ‘:warning:’ in the tree at various points (they usually occur as the final node in a sublist when they happen).

My full TreeCursor looks like this:

TreeCursor {
  mode: 2,
  buffer: BufferContext {
    parent: TreeNode { _tree: [Tree], from: 0, index: 0, _parent: null },
    buffer: TreeBuffer { buffer: [Uint16Array], length: 7, set: [NodeSet] },
    index: 0,
    start: 0
  stack: [],
  index: 36,
  bufferNode: null,
  _tree: TreeNode {
    _tree: Tree {
      type: [NodeType],
      children: [Array],
      positions: [Array],
      length: 7,
      props: null
    from: 0,
    index: 0,
    _parent: null
  type: NodeType {
    name: '⚠',
    props: [Object: null prototype] {},
    id: 0,
    flags: 6
  from: 7,
  to: 7

I checked the docs but I couldn’t find any mention of this node type, what does it mean and how can i correct it? Like I say the actual tree looks good to me from my initial testing and parsing doesn’t fail.


These are error nodes, inserted at points where the input does not match your grammar, and automatic error recovery kicks in. For tests, you may want to set the strict option to true to make the parser raise an exception rather than try to recover.

Ah, thank you!