Skip to content

Commit

Permalink
Parse operator decls in CoverDecl/ClassDecl, and handle them.. half-c…
Browse files Browse the repository at this point in the history
…orrectly :)
  • Loading branch information
nddrylliog committed Feb 14, 2013
1 parent e95a51c commit b17b5fb
Show file tree
Hide file tree
Showing 4 changed files with 512 additions and 454 deletions.
13 changes: 12 additions & 1 deletion source/rock/frontend/AstBuilder.ooc
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,18 @@ AstBuilder: class {

onOperatorEnd: unmangled(nq_onOperatorEnd) func {
oDecl := pop(OperatorDecl)
peek(Module) addOperator(oDecl)
oDecl computeName()

match (peek(Node)) {
case m: Module =>
m addOperator(oDecl)
case tDecl: TypeDecl =>
tDecl addOperator(oDecl)
case =>
message := "Now where are you putting OperatorDecl(s) ?"
error := InternalError new(token(), message)
params errorHandler onError(error)
}
}

/*
Expand Down
Loading

0 comments on commit b17b5fb

Please sign in to comment.