parseMichelsonExpression static method
Implementation
static String? parseMichelsonExpression(String code) {
var parser = Nearley();
parser.parser(Nearley.fromCompiled(MichelsonGrammar().grammar));
code = code
.replaceAll(RegExp(r'#.*$', multiLine: true), '')
.replaceAll('\n', ' ')
.trim();
parser.feedExpressionOrScript(code);
return parser.results[0];
}