Skip to content

Commit

Permalink
chore: [sugarlabs#84] Changed Variable Table type
Browse files Browse the repository at this point in the history
* Changed `IVariableTable` type
* Changed `_globalTable` accordingly
  • Loading branch information
impAkshat committed Feb 7, 2022
1 parent eb4cc5d commit 219de3a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/execution/symbolTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ import { IVariable } from '../@types/execution';

/** Type describing a set of variables. */
type IVariableTable = {
[variable: string]: IVariable;
[dataType in TDataName]: {
[variable: string]: IVariable;
};
};

// -- private variables ----------------------------------------------------------------------------

/** Stores the global table. */
let _globalTable: IVariableTable = {};
let _globalTable: IVariableTable = { string: {}, number: {}, boolean: {} };
/** Stores the processes' tables. */
let _processTable: { [process: string]: IVariableTable } = {};
/** Stores the routines' table. */
Expand Down

0 comments on commit 219de3a

Please sign in to comment.