Reorganize token types and use a map for them (#9645)

This commit is contained in:
Daniel Tschinder
2019-03-06 14:30:04 -08:00
committed by GitHub
parent e53be4b387
commit d8a5329834
4 changed files with 63 additions and 108 deletions

View File

@@ -14,6 +14,8 @@ import { isNewLine } from "../../util/whitespace";
const HEX_NUMBER = /^[\da-fA-F]+$/;
const DECIMAL_NUMBER = /^\d+$/;
// Be aware that this file is always executed and not only when the plugin is enabled.
// Therefore this contexts and tokens do always exist.
tc.j_oTag = new TokContext("<tag", false);
tc.j_cTag = new TokContext("</tag", false);
tc.j_expr = new TokContext("<tag>...</tag>", true, true);