Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Trivaxy committed Jun 15, 2024
1 parent e6f6a5d commit f0077d7
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions packages/java-edition/src/mcfunction/parser/argument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import type {
ComponentTestExactNode,
ComponentTestExistsNode,
ComponentTestNode,
ComponentTestSubpredicateNode,
ComponentTestsAllOfNode,
ComponentTestSubpredicateNode,
CoordinateNode,
EntityNode,
EntitySelectorAdvancementsArgumentCriteriaNode,
Expand All @@ -43,12 +43,13 @@ import type {
ParticleNode,
ScoreHolderNode,
UuidNode,
VectorNode} from '../node/index.js';
VectorNode,
} from '../node/index.js'
import {
BlockStatesNode,
ComponentListNode,
ComponentTestsNode,
ComponentTestsAnyOfNode,
ComponentTestsNode,
CoordinateSystem,
EntitySelectorArgumentsNode,
EntitySelectorAtVariable,
Expand Down Expand Up @@ -1907,8 +1908,14 @@ const componentTest: core.Parser<ComponentTestNode> = (src, ctx) => {
return ans
}

const componentTestsAllOf: core.InfallibleParser<ComponentTestsAllOfNode> = (src, ctx) => {
const parser: core.InfallibleParser<ComponentTestsAllOfNode> = (src, ctx) => {
const componentTestsAllOf: core.InfallibleParser<ComponentTestsAllOfNode> = (
src,
ctx,
) => {
const parser: core.InfallibleParser<ComponentTestsAllOfNode> = (
src,
ctx,
) => {
const children = []
const start = src.cursor

Expand All @@ -1922,7 +1929,7 @@ const componentTestsAllOf: core.InfallibleParser<ComponentTestsAllOfNode> = (src

children.push(testNode)
src.skipWhitespace()

if (src.peek() === ',') {
src.skip()
} else if (src.peek() === '|' || src.peek() === ']') {
Expand All @@ -1940,14 +1947,19 @@ const componentTestsAllOf: core.InfallibleParser<ComponentTestsAllOfNode> = (src
}

return ans
};
}

return parser(src, ctx)

}

const componentTestsAnyOf: core.InfallibleParser<ComponentTestsAnyOfNode> = (src, ctx) => {
const parser: core.InfallibleParser<ComponentTestsAnyOfNode> = (src, ctx) => {
const componentTestsAnyOf: core.InfallibleParser<ComponentTestsAnyOfNode> = (
src,
ctx,
) => {
const parser: core.InfallibleParser<ComponentTestsAnyOfNode> = (
src,
ctx,
) => {
const children = []
const start = src.cursor

Expand All @@ -1974,7 +1986,7 @@ const componentTestsAnyOf: core.InfallibleParser<ComponentTestsAnyOfNode> = (src
}

return ans
};
}

return parser(src, ctx)
}
Expand All @@ -1992,5 +2004,5 @@ const componentTests: core.InfallibleParser<ComponentTestsNode> = core.map(
children: res.children.filter(ComponentTestsAnyOfNode.is).map(c => c),
}
return ans
}
);
},
)

0 comments on commit f0077d7

Please sign in to comment.