You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently comments are removed and do not show up in the AST. For certain use cases (e.g. building a converter from bash to win batch scripts) it'd be useful to have the comments as specific AST elements.
The text was updated successfully, but these errors were encountered:
Comments are usually only preserved in the concrete syntax tree, and get stripped before producing an AST. I don't think preserving comments should be a goal of this project; we really only want an AST so we can then execute the command in vorpaljs/cash. Preserving comments and whitespace are huge headaches.
https://github.com/nfischer/shelljs-transpiler is a similar project with basic support for comments, although I know there's good chunks of bash missing from that grammar (mainly because that project has to parse and transpile, which slows down progress a bit).
Currently comments are removed and do not show up in the AST. For certain use cases (e.g. building a converter from bash to win batch scripts) it'd be useful to have the comments as specific AST elements.
The text was updated successfully, but these errors were encountered: