-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Starting with version 4.0.0, ts-pegjs fails to handle recursive rules like this:
start = "(" e: start ")" { return e; }
Peggy itself has no issue with this, but ts-pegjs struggles computing the types:
Error: Can only remove recursive type definitions on union types not "TypeReference"
at getInfoFromDiagnostic (C:\Users\felix\git\pseuco-ccs-interpreter\node_modules\ts-pegjs\dist\tspegjs.js:339:11)
at C:\Users\felix\git\pseuco-ccs-interpreter\node_modules\ts-pegjs\dist\tspegjs.js:304:41
at Array.map (<anonymous>)
at pruneCircularReferences (C:\Users\felix\git\pseuco-ccs-interpreter\node_modules\ts-pegjs\dist\tspegjs.js:304:30)
at TypeExtractor.getTypes (C:\Users\felix\git\pseuco-ccs-interpreter\node_modules\ts-pegjs\dist\tspegjs.js:482:5)
at generateParser (C:\Users\felix\git\pseuco-ccs-interpreter\node_modules\ts-pegjs\dist\tspegjs.js:779:35)
at C:\Users\felix\git\pseuco-ccs-interpreter\node_modules\peggy\lib\compiler\index.js:119:9
at Array.forEach (<anonymous>)
at C:\Users\felix\git\pseuco-ccs-interpreter\node_modules\peggy\lib\compiler\index.js:116:21
at Array.forEach (<anonymous>)
Version 3.1.0 could still handle this.
Metadata
Metadata
Assignees
Labels
No labels