1. 11 Jan, 2019 7 commits
    • test(overload): add positive tests for overload · fdb42310
      Tianqi Yang authored
      Add test cases:
      - overload_single1:
      	Tests of overloads functions with single parameters
      - overload_multi1:
      	Tests of overloaded functions with multiple parameters
    • test(negative): add test suite negative for compilation error tests · d865c6ed
      Tianqi Yang authored
      Add runAll.py to run the test suite
    • test(positive): add test suite positive for tests which can be compiled · cee89a83
      Tianqi Yang authored
      Add runAll.py to run the test suite
    • feat(overload): handle overloaded functions while tranlating · c544bc37
      Tianqi Yang authored
      Modify symbol.Class.resolveFieldOrder:
      - handle overloaded functions while calculating the offset
      	of each member of a class
      
      Modfiy translate.Translater.fillVTableEntries:
      - handle overloaded functions while building VTable
      
      Modify translate.Translater.createFuncty:
      - replace the function names with function signatures
    • feat(overload): build the symbol table and check types for overload · d5dd7e00
      Tianqi Yang authored
      Add FuncUtils:
      - getCallFunction:
      	Get a suitable function symbol for a specific call
      		or return an error
      	Return value is of type getCallFunctionReturn
      - getArgListString:
      	Get the string of a function with function name and parameter list
      
      Modify the process of building the symbol table:
      - visitMethodDef:
      	Modify the function table with this name
      		instead of inserting a single function
      	Add the signature of this function into the table
      - checkOverride:
      	Check overrides of overloaded functions
      - isMainClass:
      	Issue errors if main function is overloaded
      
      Modify type checks:
      - call FuncUtils.getCallFunction to get the symbol
      	of this function call
      
      Modify symbol Function:
      - toSignature:
      	Return the signature of this function
      - conflictArgList:
      	Check whether this function is conflicted with another
    • feat(overload): add errors caused by overloads · 9b68a48c
      Tianqi Yang authored
      Add errors:
      - AmbiguousNewDeclarationError:
      	Ambiguous new declarations
      		with the same parameter list but different return values
      - ConflictMainError:
      	Multiple main functions
      - MethodCallAmbiguousError:
      	Ambiguous method matches the method call
      - NoMatchMethodError:
      	No method matches the call
      - RedefinitionError:
      	Redefine the same function
      - VarOverrideMethodError:
      	Try to override the method with a variable
      
      Add CommonUtils:
      - copyList: shallow copy a List
    • feat(symbol): add symbol FunctionTable to store the table of a function · df2bb8d4
      Tianqi Yang authored
      - Add symbol FunctionTable to store the overload table of a function
      - Add function isFunctionTable in Symbol to check the type
  2. 08 Jan, 2019 1 commit
  3. 07 Jan, 2019 2 commits