Skip to content

Commit

Permalink
Little bugs fixed =/
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastorama committed Jun 12, 2012
1 parent a7fcffb commit 34550a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions RS.java
Expand Up @@ -145,6 +145,7 @@ public void process(String n, Token t) {
if( cachedProcedure != null &&
!cachedProcedure.id.equals("read") &&
!cachedProcedure.id.equals("write") &&
cachedProcedure.parameters.size() > cachedParameterCount &&
cachedProcedure.parameters.get(cachedParameterCount) != expressionType) {
errors.add("Tipo incompatível de parâmetro"+
". Linha: "+t.beginLine+
Expand Down
7 changes: 5 additions & 2 deletions SymbolTable.java
Expand Up @@ -101,8 +101,11 @@ public boolean declared(String id, int level) {
}

public Symbol search(String id, int level) {
if(declared(id, level)) {
return findOrCreateTable(level).get(id);
int i;
for(i = level; i>=0; i--) {
if(declared(id, i)) {
return findOrCreateTable(i).get(id);
}
}
return null;
}
Expand Down

0 comments on commit 34550a2

Please sign in to comment.