Simplify parser syntax

This commit is contained in:
Guillaume Gomez 2022-02-09 20:56:37 +01:00
parent 99d552092c
commit 49297337b4
11 changed files with 50 additions and 205 deletions

View file

@ -2,7 +2,6 @@ const QUERY = ['<P>', 'A<B<C<D>, E>', 'p<> u8'];
const PARSED = [
{
args: [],
elems: [{
name: "",
fullPath: [""],
@ -26,54 +25,15 @@ const PARSED = [
error: null,
},
{
args: [],
elems: [{
name: "a",
fullPath: ["a"],
pathWithoutLast: [],
pathLast: "a",
generics: [
{
name: "b",
fullPath: ["b"],
pathWithoutLast: [],
pathLast: "b",
generics: [
{
name: "c",
fullPath: ["c"],
pathWithoutLast: [],
pathLast: "c",
generics: [
{
name: "d",
fullPath: ["d"],
pathWithoutLast: [],
pathLast: "d",
generics: [],
},
],
},
{
name: "e",
fullPath: ["e"],
pathWithoutLast: [],
pathLast: "e",
generics: [],
},
],
},
],
}],
foundElems: 1,
elems: [],
foundElems: 0,
original: 'A<B<C<D>, E>',
returned: [],
typeFilter: -1,
userQuery: 'a<b<c<d>, e>',
error: null,
error: 'Unexpected `<` after `<`',
},
{
args: [],
elems: [
{
name: "p",