summaryrefslogtreecommitdiff
path: root/src/parser.mly
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2013-12-20 18:20:40 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2013-12-20 18:20:40 +0100
commit5f148b96e2e2ce0c50db349cc45b912fcc61ffbb (patch)
tree921b49503e8795ed6d28f4ec7d65c6db9934602f /src/parser.mly
parent30519a8b0748b54c29764575ddadbfb5d905b9f0 (diff)
downloadLPC-Projet-5f148b96e2e2ce0c50db349cc45b912fcc61ffbb.tar.gz
LPC-Projet-5f148b96e2e2ce0c50db349cc45b912fcc61ffbb.zip
Implémentation de l'héritage multiple (au niveau du typage)
Diffstat (limited to 'src/parser.mly')
-rw-r--r--src/parser.mly6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/parser.mly b/src/parser.mly
index 3d1eb22..2d9c206 100644
--- a/src/parser.mly
+++ b/src/parser.mly
@@ -236,6 +236,10 @@ common_statement:
{ SWriteCout(a) }
;
+qident:
+| c = TIDENT DOUBLECOLON i = IDENT { c, i }
+;
+
expression:
| e = expression_desc
{ { e_loc = $startpos, $endpos; e_desc = e } }
@@ -283,6 +287,8 @@ primary_desc:
| a = primary LPAREN arg = separated_list(COMMA, expression) RPAREN { ECall(a, arg) }
| a = primary DOT b = IDENT
{ EMember(a, b) }
+| s = qident
+ { let c, i = s in EQIdent(c, i) }
;
runop: