On Mon, Feb 4, 2013 at 3:21 PM, Michael Schmalle <apa...@teotigraphix.com>wrote:

> Oh yeah,
>
> As far as the "AS3" output you have in the graph example, that will not be
> possible with the current incarnation with Falcon. Unfortunately, the the
> parser does not keep the whitespace tokens or really any token information
> at all.
>

Well that's fine and not necessary for the proposed solution. As said
above, I think if we keep the original line numbers as comments and later
produce JavaScript source maps, we're really good. That Jangaroo produces
such output is nice, but seeing JavaScript source maps coming up probably a
heritage no longer needed for a new compiler.


>
> When a parser node is created the line and column numbers are saved from
> the token but the token is discarded and there is no real way I can update
> the parser to keep the original code. I mentioned this to Gordon a while
> ago and he did say that eventually he wanted to have Falcon be able to
> saved the tokens and white space tokens.
>
> I did have a radical thought that there could be a two pass parse with the
> tokenizer that would save the tokens into a map with location and some type
> of logic within the traverse could extract the correct tokens in between
> parser nodes using the line and column information. But this is not at all
> a priority for me but  would like to experiment sometime, maybe that is
> something you could try someday when you understand the parser abit more! :)
>

Sure, but I honestly agree that this is not a priority right now. I'd
rather contribute source maps support (later)!

-Frank-

Reply via email to