start defining grammar for integer literals
@@ -2,5 +2,17 @@ module.exports = grammar({
name: 'java',
rules: {
+ program: $ => repeat($._statement),
+
+
+
+ integer: $ => choice(
+ $.DecimalIntegerLiteral,
+ $.HexIntegerLiteral,
+ $.OctalIntegerLiteral,
+ $.BinaryIntegerLiteral
+ ),
+
+ identifier: $ => /[\a_]\w*/
}
});
