expression_language 1.0.1 expression_language: ^1.0.1 copied to clipboard
Library for parsing and evaluating simple expression language with additional references
import 'package:expression_language/expression_language.dart';
void main() {
var expressionGrammarDefinition = ExpressionGrammarParser({});
var parser = expressionGrammarDefinition.build();
var result = parser.parse('\"Hello 1 + 1 equals: \" + (1 + 1)');
var expression = result.value as Expression;
var value = expression.evaluate();
print(value);
}