Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[Dltk-dev] heredoc scanner help

hello all -

  i was hoping someone here might have a suggestion on how to approach dealing w/ heredoc in order to create a document partition so it can be 'colored'

  i can't just have a rule that starts the partition as starting as soon as it sees the heredoc, b/c things like this are valid:

    $x = <<EOF . "blah"; 
    heredoc
    EOF

  and the
 
    . "blah";

  should be treated differently from the rest of the statement.

  i'm guessing that i'm going to have to override some portion of the RuleBasedPartitionScanner in order to trace some kind of state that indicates heredoc was seen and all text after the newline up until the terminator should be treated as such??

  if there's a better idea/approach, please let me know. i checked the ruby plugin for ideas since it supports heredoc, but it doesn't look like anyone's tackled this there either.

  thanks!

--
-jae

Back to the top