Exemple #1
0
		/////////////////////////////////////////////////////////////////////////////////////////////////////
		// OBJECT
		/////////////////////////////////////////////////////////////////////////////////////////////////////

		public FunctionCall(Expression owner, Identifier name)
			: this(new TextRange( owner.StartOffset, owner == null ? name.EndOffset : owner.EndOffset ) )
			{
			// Initialize parameters
			this.Owner		= owner;
			this.Name		= name;
		}
Exemple #2
0
		/////////////////////////////////////////////////////////////////////////////////////////////////////
		// OBJECT
		/////////////////////////////////////////////////////////////////////////////////////////////////////

		/// <summary>
		/// Initializes a new instance of the <c>VariableExpression</c> class.
		/// </summary>
		/// <param name="name">The name of the variable.</param>
		/// <param name="textRange">The <see cref="TextRange"/> of the AST node.</param>
		public VariableExpression(Identifier name) : this(name.TextRange) {
			// Initialize parameters
			this.Name = name;
		}
Exemple #3
0
		/// <summary>
		/// Matches a <c>Identifier</c> non-terminal.
		/// </summary>
		/// <returns><c>true</c> if the <c>Identifier</c> was matched successfully; otherwise, <c>false</c>.</returns>
		/// <remarks>
		/// The non-terminal can start with: <c>Identifier</c>.
		/// </remarks>
		protected virtual bool MatchIdentifier(out Identifier identifier) {
			identifier = null;
			if (!this.Match(LuatTokenId.Identifier))
				return false;
			identifier = new Identifier( this.TokenText, this.Token.TextRange );
			return true;
		}