You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Claude Brisson (Jira)" <ji...@apache.org> on 2019/09/08 11:08:00 UTC

[jira] [Commented] (VELOCITY-394) RFE: optional record comments

    [ https://issues.apache.org/jira/browse/VELOCITY-394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16925146#comment-16925146 ] 

Claude Brisson commented on VELOCITY-394:
-----------------------------------------

The idea of using the AST tree for code highlighting is very good. But loosing the comments doesn't seem a big deal, since you know the position of the next elements in the tree.

This workaround would be preferable to always keeping the comments in the AST tree, because that is not a desirable option in production, and because it seems fairly complex to parametrize this behavior at run time.


> RFE: optional record comments
> -----------------------------
>
>                 Key: VELOCITY-394
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-394
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.5
>         Environment: Operating System: All
> Platform: All
>            Reporter: Jens Elkner
>            Priority: Minor
>
> At the moment, the whole content except the terminator of a comment are dropped.
> This ok, for the normal server/application use, where a template is evaluated,
> but for IDEs it would be a big advantage, to have the whole comment in the
> parser tree, so that a ParserVisitor can be used, e.g. to highlight comments in
> an editor.
> So it would be nice, to have something like parser.recordComments(boolean
> complete), to dis/enable the recording of the complete comment, if encountered.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org