[ https://issues.apache.org/jira/browse/PIG-2012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029063#comment-13029063 ]
Xuefu Zhang commented on PIG-2012: ---------------------------------- 1. Macro invocation stack should be per macro, not per node in a macro. Also, stack seems to be a more appropriate data structure for this. 2. To get line numbers correctly, we should be able to do it more naturally in PigParserNode constractor, rather than prepending \n in the text. 3. It might be cleaner and more OO if we have PigParserMacroNode that inherits from PigParserNode. In that case, we only need to override toString() method, but avoid if-else clauses in the code. > Comments at the begining of the file throws off line numbers in errors > ---------------------------------------------------------------------- > > Key: PIG-2012 > URL: https://issues.apache.org/jira/browse/PIG-2012 > Project: Pig > Issue Type: Bug > Components: impl > Affects Versions: 0.9.0 > Reporter: Alan Gates > Assignee: Richard Ding > Fix For: 0.9.0 > > Attachments: PIG-2012_1.patch, macro.pig > > > The preprocessor does not appear to be handling leading comments properly > when calculating line numbers for error messages. In the attached script, > the error is reported to be on line 7. It is actually on line 10. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira