module.exports = grammar({ name: 'Dust', rules: { source_file: $ => repeat(choice($.comment, $.expression)), identifier: $ => /[a-zA-Z|_|.]+(_[a-zA-Z]+)*/, comment: $ => /(#)(.+?)([\n\r])/, expression: $ => choice( $.identifier, seq($.identifier, $.operator, $.identifier) ), operator: $ => choice( '=', '-', '+', ';', '/', '|', '&' ), integer: $ => /\d/, } });