refactor(tests): migrate remaining grammar.json tests to grammar.js
This commit is contained in:
parent
26fa3a76a5
commit
627617edb4
36 changed files with 560 additions and 1212 deletions
|
|
@ -418,7 +418,20 @@ function grammar(baseGrammar, options) {
|
|||
throw new Error("Grammar must have at least one rule.");
|
||||
}
|
||||
|
||||
return { grammar: { name, inherits, word, rules, extras, conflicts, precedences, externals, inline, supertypes } };
|
||||
return {
|
||||
grammar: {
|
||||
name,
|
||||
...(inherits ? ( inherits ) : {}),
|
||||
word,
|
||||
rules,
|
||||
extras,
|
||||
conflicts,
|
||||
precedences,
|
||||
externals,
|
||||
inline,
|
||||
supertypes,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function checkArguments(args, ruleCount, caller, callerName, suffix = '', argType = 'rule') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue