X-Git-Url: http://nitlanguage.org diff --git a/src/parser/parser_prod.nit b/src/parser/parser_prod.nit index 362dbf7..43abe9e 100644 --- a/src/parser/parser_prod.nit +++ b/src/parser/parser_prod.nit @@ -72,6 +72,9 @@ redef class Prod if first_token == null then return "????" end + if last_token == null then + return "{first_token.locate}--????" + end var lastpos = last_token.pos + last_token.text.length - 1 if first_token.line == last_token.line then return "{first_token.locate}--{lastpos}" @@ -1498,6 +1501,13 @@ redef class AAttrPropdef n.parent = self end end + redef meth n_kwvar=(n: TKwvar) + do + _n_kwvar = n + if n != null then + n.parent = self + end + end redef meth n_id=(n: TAttrid) do _n_id = n @@ -1529,6 +1539,7 @@ redef class AAttrPropdef n_kwredef: TKwredef , n_visibility: PVisibility , n_kwattr: TKwattr , + n_kwvar: TKwvar , n_id: TAttrid , n_type: PType , n_expr: PExpr @@ -1559,6 +1570,10 @@ redef class AAttrPropdef if n_kwattr != null then n_kwattr.parent = self end + _n_kwvar = n_kwvar + if n_kwvar != null then + n_kwvar.parent = self + end _n_id = n_id if n_id != null then n_id.parent = self @@ -1636,6 +1651,16 @@ redef class AAttrPropdef end return end + if _n_kwvar == old_child then + if new_child != null then + new_child.parent = self + assert new_child isa TKwvar + _n_kwvar = new_child + else + _n_kwvar = null + end + return + end if _n_id == old_child then if new_child != null then new_child.parent = self @@ -1688,6 +1713,9 @@ redef class AAttrPropdef if _n_kwattr != null then v.visit(_n_kwattr) end + if _n_kwvar != null then + v.visit(_n_kwvar) + end if _n_id != null then v.visit(_n_id) end @@ -1719,6 +1747,9 @@ redef class AAttrPropdef if _n_kwattr != null then v.visit(_n_kwattr) end + if _n_kwvar != null then + v.visit(_n_kwvar) + end if _n_id != null then v.visit(_n_id) end