コード例 #1
0
 private void _UpdateLastVariableAccess(VariableAccess variable, object value)
 {
     switch (variable.Operation)
     {
         case AccessType.LocalGet:
         case AccessType.LocalSet:
             //_FunctionStacks.Last().Locals.Push(variable);
             break;
         case AccessType.GlobalGet:
         case AccessType.GlobalSet:
             variableAccessStack.Clear();
             break;
     }
     variableAccessStack.Push(variable);
 }
コード例 #2
0
ファイル: LuaExpressions.cs プロジェクト: SPARTAN563/IronLua
 /// <summary>
 /// Creates a wrapper around a variable access expression which will register it
 /// </summary>
 public static Expr VariableAccess(CodeContext context, Expression variable, VariableAccess access)
 {
     return new VariableAccessExpression(context, variable, access).Reduce();
 }
コード例 #3
0
 internal static Expr UpdateLastVariableAccess(CodeContext context, VariableAccess variable, Expr value)
 {
     return CallBackingMethod("_UpdateLastVariableAccess", context, Expr.Constant(variable), value);
 }
コード例 #4
0
        private readonly Expression _variable; //The expression representing the variable access

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Creates a wrapper around a variable access expression which will register it
        /// </summary>
        public VariableAccessExpression(CodeContext context, Expression variable, VariableAccess access)
        {
            _context = context;
            _variable = variable;
            _access = access;
        }