Skip to content
Snippets Groups Projects
  • benjamin.franksen's avatar
    dff3aa9a
    snc: re-factored and polished function definitions · dff3aa9a
    benjamin.franksen authored
    This came out of the desire to allow function definitions intermixed
    with c code and other definitions, and not only at the end of the
    program but also in the initial definition section. Some amount of
    re-factoring was necessary in the analysis part to make this possible,
    since previously we had only one definition list per scope and now the
    program has two. More changes were needed in the code generation, mostly
    to pick apart the stuff that the parser now mixes together, and also to
    beautify the generated code. The separate declarations for function
    definitions are no longer in the header file; they are static anyway.
    
    One difference in behaviour is that now the extra escaped C code
    sections at the end of a program are paced *before* the state set code.
    The advantage is that extra prototypes are no longer needed (except if
    the functions call each other resursively). This change should not break
    existing programs, since C functions cannot call state set functions. 
    dff3aa9a
    History
    snc: re-factored and polished function definitions
    benjamin.franksen authored
    This came out of the desire to allow function definitions intermixed
    with c code and other definitions, and not only at the end of the
    program but also in the initial definition section. Some amount of
    re-factoring was necessary in the analysis part to make this possible,
    since previously we had only one definition list per scope and now the
    program has two. More changes were needed in the code generation, mostly
    to pick apart the stuff that the parser now mixes together, and also to
    beautify the generated code. The separate declarations for function
    definitions are no longer in the header file; they are static anyway.
    
    One difference in behaviour is that now the extra escaped C code
    sections at the end of a program are paced *before* the state set code.
    The advantage is that extra prototypes are no longer needed (except if
    the functions call each other resursively). This change should not break
    existing programs, since C functions cannot call state set functions. 
Code owners
Assign users and groups as approvers for specific file changes. Learn more.