forked from lkesteloot/turbopascal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Symbol.js
30 lines (27 loc) · 939 Bytes
/
Symbol.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Stores information about a single symbol.
'use strict';
define(function () {
/**
* Create a new symbol.
*
* name: name of symbol (original case is fine).
* type: type of the symbol (Node.SIMPLE_TYPE, etc.).
* address:
* if variable: address of symbol relative to mark pointer.
* if user procedure: address in istore.
* if system procedure: index into native array.
* isNative: true if it's a native subprogram.
* value: node of value if it's a constant.
* byReference: whether this symbol is a reference or a value. This only applies
* to function/procedure parameters.
*/
var Symbol = function (name, type, address, byReference) {
this.name = name;
this.type = type;
this.address = address;
this.isNative = false;
this.value = null;
this.byReference = byReference;
};
return Symbol;
});