Skip to content
Snippets Groups Projects
  • Erwan Jahier's avatar
    e64e1031
    Wrap the parser output with a new function, · e64e1031
    Erwan Jahier authored
    SolveIdent.recognize_predef_op  that  replaces  node call  by  Predef
    constructor  when   necessary,  via  a  complete   traversal  of  the
    SyntaxTree (instead  of doing it  in the parser). The  rationales for
    this change are that:
    
    - it is quite tedious to do it in parser as multiple locations are involved
    - I did missed some locations
    - It makes the parser more focused on parsing issues
    - that traversal  is a first step  do deal with  idref solving (hence
     the name of the new module that contains that function
    
    Note that lsrc/test/should_work/fab_test/lecteur.lus was using
    "plus" as a variable ident, which raised an error, which
    e64e1031
    History
    Wrap the parser output with a new function,
    Erwan Jahier authored
    SolveIdent.recognize_predef_op  that  replaces  node call  by  Predef
    constructor  when   necessary,  via  a  complete   traversal  of  the
    SyntaxTree (instead  of doing it  in the parser). The  rationales for
    this change are that:
    
    - it is quite tedious to do it in parser as multiple locations are involved
    - I did missed some locations
    - It makes the parser more focused on parsing issues
    - that traversal  is a first step  do deal with  idref solving (hence
     the name of the new module that contains that function
    
    Note that lsrc/test/should_work/fab_test/lecteur.lus was using
    "plus" as a variable ident, which raised an error, which