예제 #1
0
        protected sunLoop PushLoop(sunContext context, sunLoopFlags flags)
        {
            var name = context.PopNameLabel();

            if (name == null)
            {
                return(context.Loops.Push(flags));
            }
            return(context.Loops.Push(name.Label.Value, flags));
        }
예제 #2
0
        sunExpressionFlags sunTerm.GetExpressionFlags(sunContext context)
        {
            var symbol = context.MustResolveCallable(this);
            var flags  = sunExpressionFlags.Calls;

            if ((symbol.Modifiers & sunSymbolModifiers.Constant) == 0)
            {
                flags |= sunExpressionFlags.Dynamic;
            }
            return(flags);
        }
예제 #3
0
        static sunExpressionFlags AnalyzeExpression(sunContext context, sunExpression expression)
        {
            var flags = sunExpressionFlags.None;

            foreach (var operand in expression.OfType <sunOperand>())
            {
                var term = operand.Term as sunTerm;
                if (term != null)
                {
                    flags |= term.GetExpressionFlags(context);
                }
            }
            return(flags);
        }
예제 #4
0
 sunExpressionFlags sunTerm.GetExpressionFlags(sunContext context)
 {
     return(AnalyzeExpression(context, this));
 }
예제 #5
0
 sunExpressionFlags sunTerm.GetExpressionFlags(sunContext context)
 {
     return(sunExpressionFlags.Augments);
 }
예제 #6
0
 public sunExpressionFlags Analyze(sunContext context)
 {
     return(AnalyzeExpression(context, this));
 }
예제 #7
0
 sunExpressionFlags sunTerm.GetExpressionFlags(sunContext context)
 {
     return(Condition.Analyze(context) | TrueBody.Analyze(context) | FalseBody.Analyze(context));
 }
예제 #8
0
파일: compiler.cs 프로젝트: RenolY2/ssc
 public sunCompiler()
 {
     mContext = new sunContext();
     mParser  = new sunParser();
 }
예제 #9
0
 sunExpressionFlags sunTerm.GetExpressionFlags(sunContext context)
 {
     return(sunExpressionFlags.Literals);
 }