Comments (3)
@mhanberg Zero worries! This is low prio. Feel better.
from spitfire.
@zachallaun I think the premise is reasonable, not entirely sure how it would look off the top of my head.
Naively, I think you could wrap every line that constructs a node with a function that invokes either the node_encoder
or does the default behavior. There are probably some places where the AST is being changed in different places after its constructed, which might make it difficult.
Please submit a spike whenever you get some time, it would be helpful to see what it might look like. It's entirely possible that a pluggable encoder still won't be able to achieve the desire you have, so it'd be good to spike out a more intricate case.
As a concrete example: when parsing Foo.Bar.\nBaz (note the newline), it's not possible to determine which line Bar occurs on without inspecting the source, but with token data, it would be.
Side note, this in particular could potentially be upstreamed to the core yecc parser, and then I could mimic the behavior into Spitfire.
from spitfire.
Hi, sorry I've been off the computer for a while due to a back issue, just getting back in.
I'll give this a thorough read this week and reply.
from spitfire.
Related Issues (14)
- Spitfire doesn't handle unquote inside specs HOT 1
- Spitfire doesn't handle `%__MODULE__.Foo{bar: "foo"}`
- Spitfire doesn't handle nested access patterns
- Add repo description, website, and topics
- bug: node could be dropped in certain circumstances HOT 1
- bug: failed to parse a bracketed keyword list
- Error-tolerant tokenization HOT 5
- multi aliases
- bug: peek_token HOT 2
- refactor: on demand lexing
- Grouped expression with single expression sometimes is a block HOT 1
- __MODULE__ prefixed aliases and function calls
- bug: trailing commas
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spitfire.