test03.spec.js 576 B

1234567891011121314151617181920
  1. import Lexers from './../grammar/';
  2. import {
  3. IVProgParser
  4. } from './../js/ast/ivprogParser';
  5. import { LanguageService } from '../js/services/languageService';
  6. describe('Expressions which ends with ID terminals', () => {
  7. let input = `funcao inteiro test(real i) {
  8. inteiro a = 5 + i
  9. a = 5 + G[i][6]
  10. }`;
  11. const lexer = LanguageService.getCurrentLexer();
  12. it(`should not result in SyntaxError`, () => {
  13. const as = new IVProgParser(input, lexer);
  14. const fun = as.parseFunction.bind(as);
  15. expect(fun).not.toThrow();
  16. });
  17. });