Skip to content

Here-doc implementation #52

@dotmpe

Description

@dotmpe

@parro-it since here-docs are a different beast than here-strings (#49), could you comment on what would be required to implement? I'm not familiar with Bison and neither have a good idea what the AST would look like.

I can see how extending the posix grammar it can be made to go into a javascript routine. E.g

      io_here: [
~       [
~         'DLESS here_end',
+         '$$ = yy.ioHere($1, $here_end);'
+       ],
+       [
+         'DLESSDASH here_end',
+         '$$ = yy.ioHere($1, $here_end);'
+       ]
      ],

But its not clear to me how to handle the here-doc text as a specially interpolated string, and stop at the custom here-doc marker.

ref docs http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_04

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions