How to use the TokContext function from acorn

Find comprehensive JavaScript acorn.TokContext code examples handpicked from public code repositorys.

121
122
123
124
125
126
127
128
129
130
131
const {TokenType, TokContext, tokTypes, tokContexts, isNewLine, isIdentifierStart, isIdentifierChar} = require("acorn");
const {idents} = require('./util.js');
const arrowjsType = require('./arrowjsType.js');


const proc_tc = {
  p_expr: new TokContext("proc", true),
  p_cmd: new TokContext("cmd"),
  p_do: new TokContext("do{}"),
};

fork icon0
star icon0
watch icon4

+ 2 other calls in file

-3
fork icon0
star icon0
watch icon1

+ 3 other calls in file