Mercurial > projects > dang
diff parser/Action.d @ 75:86aec2160221 new_gen
Parsing "int* x"
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Fri, 02 May 2008 15:05:02 +0200 |
parents | 381975d76baf |
children | 110c7e1c4ca2 |
line wrap: on
line diff
--- a/parser/Action.d Fri May 02 13:19:23 2008 +0200 +++ b/parser/Action.d Fri May 02 15:05:02 2008 +0200 @@ -22,8 +22,14 @@ } -struct Id +class Id { + public static Id opCall(Token tok) + { + auto id = new Id(); + id.tok = tok; + return id; + } Token tok; char[] toString() @@ -32,6 +38,18 @@ } } +class PointerId : Id +{ + public static PointerId opCall(Id id) + { + auto p = new PointerId(); + p.id = id; + return p; + } + + Id id; +} + /** All methods are optional.