[
http://jira.codehaus.org/browse/JANINO-91?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_96404 ]
Adam Heath commented on JANINO-91:
----------------------------------
I have a file, that has possible import statements, possible comments, no package header at the top. Then, it has a method body.
With this and other patches, I parse out the header(by popping all comments, whitespace, and import tokens) into a StringBuffer, then the rest of the tokens are parsed into another String. During compillation, I then concat these two, but wrap the method body in a generated package and classname. The added text has no embedded newlines, so that I can maintain proper line numbers in stack traces.
So, I don't need a CBE.
> Add support for returning tokens of whitespace
> ----------------------------------------------
>
> Key: JANINO-91
> URL:
http://jira.codehaus.org/browse/JANINO-91> Project: Janino
> Issue Type: New Feature
> Reporter: Adam Heath
> Assignee: Arno Unkrig
> Priority: Minor
> Attachments: feature_swallowable_whitespace_comment_tokens.patch
>
>
> I have code that filters package/import stmts from source files, then wraps the remaining code in a class definition. To keep line numbers identical after adding the class definition, I need to have comments and whitespace parsed an return to my application. The attached patch does this.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email