start separating validation from parsing

This commit is contained in:
Dave Holoway
2020-06-16 12:59:08 +01:00
parent 1801a81c0f
commit b050f3a82d
4 changed files with 217 additions and 1039 deletions

View File

@@ -106,13 +106,15 @@ class SourceField extends Field {
* @param {Token[]} modifiers
* @param {SourceTypeIdent} field_type_ident
* @param {Token} name_token
* @param {ResolvedIdent} init
*/
constructor(owner, modifiers, field_type_ident, name_token) {
constructor(owner, modifiers, field_type_ident, name_token, init) {
super(modifiers.map(m => m.value), '');
this.owner = owner;
this.modifierTokens = modifiers;
this.fieldTypeIdent = field_type_ident;
this.nameToken = name_token;
this.init = init;
}
get name() {