IronKonoha.Token.IsResolved C# (CSharp) Method

IsResolved() public method

public IsResolved ( Context ctx, KonohaSpace ks ) : bool
ctx Context
ks KonohaSpace
return bool
        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;
        }