1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-11-16 23:53:09 -08:00

Register precedences of TreeValue operators.

This commit is contained in:
Danila Fedorin 2017-08-25 19:49:37 -07:00
parent b98b08b872
commit c2feedee32

View File

@ -189,6 +189,12 @@ public class ShuntingYardParser implements Parser<Match<TokenType>>, PluginListe
associativityMap.put(operator, operatorInstance.getAssociativity());
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