Ignore:
Timestamp:
Feb 11, 2017, 6:55:42 PM (8 years ago)
Author:
chronos
Message:
  • Modified: Now project3 can interpret project2.
  • Modified: To support standard input and output inside interpreter, all lines read from input starting with | symbol is passed to interpreted code. Also text written to standard output by interpretted program is prefixed with | symbol.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/interpreter/Source3.pas

    r101 r102  
    7272    Name: string;
    7373    DataType: PType;
     74    Output: Boolean;
    7475  end;
    7576
     
    185186function FunctionCreate(Name: string; DataType: PType): TFunction;
    186187function TypeCreate(Name: string; BaseType: TBaseType): TType;
    187 function FunctionParameterCreate(Name: string; DataType: PType): TFunctionParameter;
     188function FunctionParameterCreate(Name: string; DataType: PType; Output: Boolean = False): TFunctionParameter;
    188189
    189190var
     
    216217end;
    217218
    218 function FunctionParameterCreate(Name: string; DataType: PType): TFunctionParameter;
     219function FunctionParameterCreate(Name: string; DataType: PType; Output: Boolean = False): TFunctionParameter;
    219220begin
    220221  Result.Name := Name;
    221222  Result.DataType := DataType;
     223  Result.Output := Output;
    222224end;
    223225
Note: See TracChangeset for help on using the changeset viewer.