Exemplo n.º 1
0
        /// <summary>
        /// Compiles the code
        /// </summary>
        public void Compile()
        {
            if (!ExpressionList.Any(exp => exp.ByteCode.Equals(05)))
            {
                throw new ArgumentException("Your code doesnt have any entry points!");
            }

            compiled = true;
        }
Exemplo n.º 2
0
		ExpressionList ParseFunctionArguments (ref int start, int end)
		{
			var args = new ExpressionList ();
			do {
				SkipSpaces (ref start);
				if (start == source.Length)
					throw new InvalidProjectFileException ("unterminated function call arguments.");
				if (source [start] == ')')
					break;
				else if (args.Any ()) {
					if (source [start] != ',')
						throw new InvalidProjectFileException (string.Format ("invalid function call arguments specification. ',' is expected, got '{0}'", source [start]));
					start++;
				}
				args.Add (ParseSingle (ref start, end));
			} while (true);
			start++;
			return args;
		}