a bug about parseFilter
See original GitHub issuetry eslint
to reproduce the bug.
<template>
<div>{{ 1 | identity() || 0 }}</div>
</template>
<script>
export default {};
</script>
This is because identity() || 0
is LogicalExpression
but not CallExpression
.
This is the bug code.
// `parseFilter` in `./src/script/index.ts`
if (argsCode != null) {
const { ast } = parseScriptFragment(
`0${argsCode}`,
locationCalculator.getSubCalculatorAfter(paren - 1),
parserOptions,
)
const statement = ast.body[0] as ESLintExpressionStatement
const callExpression = statement.expression as ESLintCallExpression
ast.tokens!.shift()
// this is LogicalExpression
for (const argument of callExpression.arguments) {
argument.parent = expression
expression.arguments.push(argument)
}
// ...
}
im not good at parser, and I dont know how to fix this bug. So i only create an issue but not a pr.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
a bug about parseFilter · Issue #37 · vuejs/vue-eslint-parser · GitHub
This is because identity() || 0 is LogicalExpression but not CallExpression . This is the bug code. // `parseFilter` in `./src/script/index.ts` if (argsCode...
Read more >Bug #16738 :: Problem parsing filter - PHP
Description: ------------ Hello, I want to parse filter string with Net_LDAP2_Filter :: parse() : My filter is ...
Read more >scim2-parse-filter vulnerabilities | Snyk
Learn more about known vulnerabilities in the scim2-parse-filter package. ... version 0.2.0 with bug correction.
Read more >1943386 – knockd: pcap: can't parse filter expression
Bug 1943386 - knockd: pcap: can't parse filter expression: syntax error. Summary: knockd: pcap: can't parse filter expression: syntax error ...
Read more >[Libreoffice-bugs] [Bug 113974] Ability to parse/filter JSON data and ...
[Libreoffice-bugs] [Bug 113974] Ability to parse/filter JSON data and extract fields · bugzilla-daemon Mon, 29 Nov 2021 05:48:40 -0800.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think this should be a syntax error.
@yyx990803 Thank you!