Update shrimp.test.ts

This commit is contained in:
Corey Johnson 2025-10-06 17:05:36 -07:00
parent a28bdf74c9
commit 0f4db1d261

View File

@ -234,6 +234,26 @@ describe('Fn', () => {
}) })
}) })
describe('abmiguity', () => {
test('parses ambiguous expressions correctly', () => {
expect('a + -3').toMatchTree(`
BinOp
Identifier a
operator +
Number -3
`)
})
test('parses ambiguous expressions correctly', () => {
expect('a-var + a-thing').toMatchTree(`
BinOp
Identifier a-var
operator +
Identifier a-thing
`)
})
})
describe('Assignment', () => { describe('Assignment', () => {
test('parses assignment with addition', () => { test('parses assignment with addition', () => {
expect('x = 5 + 3').toMatchTree(` expect('x = 5 + 3').toMatchTree(`