1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-02-06 13:31:05 +00:00

Adding a few more default directives to find.

This commit is contained in:
jespergravgaard 2019-10-19 00:33:27 +02:00
parent fcf0d65bcb
commit 40ade8e60e
2 changed files with 4 additions and 9 deletions

View File

@ -1,14 +1,9 @@
package dk.camelot64.kickc.model;
import dk.camelot64.kickc.model.statements.StatementSource;
import dk.camelot64.kickc.model.symbols.*;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.types.SymbolTypeArray;
import dk.camelot64.kickc.model.types.SymbolTypePointer;
import dk.camelot64.kickc.model.types.SymbolTypeStruct;
import dk.camelot64.kickc.model.values.ScopeRef;
import dk.camelot64.kickc.model.symbols.Procedure;
import dk.camelot64.kickc.model.symbols.SymbolVariable;
import java.util.*;
import java.util.List;
/** A declaration directive. */
public interface Directive {

View File

@ -133,7 +133,7 @@ public class DirectiveParserContext {
//this.defaultDirectives.add(new Directive.Register(true, null));
this.registerImpliesDirectives = new ArrayList<>();
this.typeDirectives = new HashMap<>();
this.typeDirectives.put(DirectiveType.ARRAY, Arrays.asList(new Directive.MemoryArea(SymbolVariable.MemoryArea.MAIN_MEMORY, null), new Directive.Register(false, null)));
this.typeDirectives.put(DirectiveType.ARRAY, Arrays.asList(new Directive.Const(), new Directive.MemoryArea(SymbolVariable.MemoryArea.MAIN_MEMORY, null), new Directive.Register(false, null)));
this.scopeDirectives = new HashMap<>();
this.scopeTypeDirectives = new HashMap<>();
}