Comments (3)
Ahh I didn't realize I was making that so annoying. Sorry!
You can pass nil
. That will just mean it won't be able to find its source location. But that's actually probably fine in this case?
Otherwise you should be able to pull the source off the ParseResult
object.
from prism.
To be clear, all of the source
objects that come from the same ParseResult
object are actually the same object, we just keep a reference from every node/location because it makes it easier on the consumer. (Or in this case, much harder...)
from prism.
Oh, that's fine! I should have dug deeper... but it makes sense it would be the same object. Thanks!
from prism.
Related Issues (20)
- Unexpected write target for multi write node HOT 3
- Failure when calling `transpose` in `Prism::Translation::Parser` HOT 3
- `Prism::Translation::RubyParser` edge case when interpolating `__FILE__` into a string
- `Prism::Translation::RubyParser` - nested string literal interpolations are not flattened
- Parser Compiler: NoMethodError: undefined method `opening_loc' for @ ItParametersNode
- Update makefile to use / fall back on built-in "ar" HOT 36
- Value omitted hash keys ending with `!` or `?` are being parsed
- Syntax errors for jumps within `eval` HOT 9
- method_source not working with Prism due to different SyntaxError messages HOT 1
- CRuby prism compiler: respect Coverage eval setting HOT 1
- CRuby tests/specs passing HOT 1
- Problem requiring "prism/translation/parser33"
- Fails to install gem on Windows 10 HOT 6
- `Prism::Translation::RubyParser` - Separate lines inside squiggly heredocs not combined
- `Prism::Translation::RubyParser` - Module name with extend HOT 3
- `Prism::Translation::RubyParser` - Interpolation in adjacent strings
- Lex difference for self assignment HOT 2
- Prism rejects valid (?) syntax that CRuby accepts: `break while false` HOT 2
- Lex difference for heredoc with zero indentation and line continuation
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 prism.