Changeset 800:cdf00d77dbfb in livinglogic.java.ul4

Show
Ignore:
Timestamp:
02/19/13 14:03:22 (7 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Update source offsets in bracketed expressions.

Location:
src/main
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • src/main/antlr3/com/livinglogic/ul4/UL4.g

    r796 r800  
    329329    | e_dict=dict { $node = $e_dict.node; } 
    330330    | e_dictcomp=dictcomprehension { $node = $e_dictcomp.node; } 
    331     | '(' e_genexpr=generatorexpression ')' { $node = $e_genexpr.node; } 
    332     | '(' e_bracket=expr1 ')' { $node = $e_bracket.node; } 
     331    | open='(' e_genexpr=generatorexpression close=')' { $node = $e_genexpr.node; $node.setStart(getStart($open)); $node.setEnd(getEnd($close)); } 
     332    | open='(' e_bracket=expr1 close=')' { $node = $e_bracket.node; $node.setStart(getStart($open)); $node.setEnd(getEnd($close)); } 
    333333    ; 
    334334 
  • src/main/java/com/livinglogic/ul4/AST.java

    r796 r800  
    123123    } 
    124124 
     125    public void setStart(int start) 
     126    { 
     127        this.start = start; 
     128    } 
     129 
    125130    public void setEnd(int end) 
    126131    {