test(parser): add test for pipe with inline function
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f17d8d3a35
commit
d77a5caf23
|
|
@ -599,6 +599,26 @@ describe('pipe expressions', () => {
|
||||||
Identifier h
|
Identifier h
|
||||||
`)
|
`)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('pipe with inline function', () => {
|
||||||
|
expect('items | each fn x: x end').toMatchTree(`
|
||||||
|
PipeExpr
|
||||||
|
FunctionCallOrIdentifier
|
||||||
|
Identifier items
|
||||||
|
operator |
|
||||||
|
FunctionCall
|
||||||
|
Identifier each
|
||||||
|
PositionalArg
|
||||||
|
FunctionDef
|
||||||
|
keyword fn
|
||||||
|
Params
|
||||||
|
Identifier x
|
||||||
|
colon :
|
||||||
|
FunctionCallOrIdentifier
|
||||||
|
Identifier x
|
||||||
|
end end
|
||||||
|
`)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('multiline', () => {
|
describe('multiline', () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user