mirror of
https://github.com/DanilaFe/abacus
synced 2024-12-22 07:20:09 -08:00
Register precedences of TreeValue operators.
This commit is contained in:
parent
b98b08b872
commit
c2feedee32
|
@ -189,6 +189,12 @@ public class ShuntingYardParser implements Parser<Match<TokenType>>, PluginListe
|
||||||
associativityMap.put(operator, operatorInstance.getAssociativity());
|
associativityMap.put(operator, operatorInstance.getAssociativity());
|
||||||
typeMap.put(operator, operatorInstance.getType());
|
typeMap.put(operator, operatorInstance.getType());
|
||||||
}
|
}
|
||||||
|
for (String operator : manager.getAllTreeValueOperators()) {
|
||||||
|
Operator operatorInstance = manager.treeValueOperatorFor(operator);
|
||||||
|
precedenceMap.put(operator, operatorInstance.getPrecedence());
|
||||||
|
associativityMap.put(operator, operatorInstance.getAssociativity());
|
||||||
|
typeMap.put(operator, operatorInstance.getType());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user