expressionEOS.spec.js 480 B

1234567891011121314151617
  1. import Lexers from './../grammar/';
  2. import {
  3. IVProgParser
  4. } from './../js/ast/ivprogParser';
  5. import {
  6. SyntaxError
  7. } from './../js/ast/SyntaxError';
  8. describe('Expressions which ends with ID terminals:', () => {
  9. let input = 'test = i\nb = i + 1\n';
  10. const lexer = Lexers['pt_br'];
  11. it(`${input} should not result in SyntaxError`, () => {
  12. const as = new IVProgParser(input, lexer);
  13. expect(as.parseIDCommand()).not.toThrow(SyntaxError);
  14. });
  15. });