Beispiel #1
0
 public KStatement(LineInfo line, KonohaSpace ks)
 {
     this.ULine = line;
     this.ks = ks;
     annotation = new Dictionary<KeywordType, bool>();
     map = new Dictionary<object, KonohaExpr>();
 }
Beispiel #2
0
 public Parser(Context ctx, KonohaSpace ks)
 {
     this.ctx = ctx;
     this.ks = ks;
 }
Beispiel #3
0
 public Konoha()
 {
     ctx = new Context();
     space = new KonohaSpace(ctx);
 }
Beispiel #4
0
 public Tokenizer(Context ctx, KonohaSpace ks)
 {
     this.ctx = ctx;
     this.ks = ks;
 }
Beispiel #5
0
 // static kbool_t Token_resolved(CTX, kKonohaSpace *ks, struct _kToken *tk)
 public bool IsResolved(Context ctx, KonohaSpace ks)
 {
     KKeyWord kw = ctx.kmodsugar.keyword_(this.Text, null);
     if (kw != null && kw != Symbol.NONAME)
     {
         Syntax syn = ks.GetSyntax(kw.Type);
         if (syn != null)
         {
             if (syn.Type != KonohaType.Unknown)
             {
                 this.Keyword = KeywordType.Type;
                 this.Type = TokenType.TYPE;
                 this.KType = syn.Type;
             }
             else
             {
                 this.Keyword = kw.Type;
             }
             return true;
         }
     }
     return false;
 }