Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-14 15:10:05 +01:00
Added license blocks and element comments to all expression parser classes.
Also updated some terminology
Dieser Commit ist enthalten in:
Ursprung
71287299b5
Commit
dfb729d5f1
@ -1,3 +1,22 @@
|
|||||||
|
// $Id$
|
||||||
|
/*
|
||||||
|
* WorldEdit
|
||||||
|
* Copyright (C) 2010, 2011 sk89q <http://www.sk89q.com>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.expression.parser;
|
package com.sk89q.worldedit.expression.parser;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -1,3 +1,22 @@
|
|||||||
|
// $Id$
|
||||||
|
/*
|
||||||
|
* WorldEdit
|
||||||
|
* Copyright (C) 2010, 2011 sk89q <http://www.sk89q.com>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.expression.parser;
|
package com.sk89q.worldedit.expression.parser;
|
||||||
|
|
||||||
import com.sk89q.worldedit.expression.lexer.tokens.OperatorToken;
|
import com.sk89q.worldedit.expression.lexer.tokens.OperatorToken;
|
||||||
|
@ -1,5 +1,29 @@
|
|||||||
|
// $Id$
|
||||||
|
/*
|
||||||
|
* WorldEdit
|
||||||
|
* Copyright (C) 2010, 2011 sk89q <http://www.sk89q.com>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.expression.runtime;
|
package com.sk89q.worldedit.expression.runtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A break or continue statement.
|
||||||
|
*
|
||||||
|
* @author TomyLobo
|
||||||
|
*/
|
||||||
public class Break extends Node {
|
public class Break extends Node {
|
||||||
boolean doContinue;
|
boolean doContinue;
|
||||||
|
|
||||||
|
@ -1,5 +1,30 @@
|
|||||||
|
// $Id$
|
||||||
|
/*
|
||||||
|
* WorldEdit
|
||||||
|
* Copyright (C) 2010, 2011 sk89q <http://www.sk89q.com>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.expression.runtime;
|
package com.sk89q.worldedit.expression.runtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Thrown when a break or continue is encountered.
|
||||||
|
* Loop constructs catch this exception.
|
||||||
|
*
|
||||||
|
* @author TomyLobo
|
||||||
|
*/
|
||||||
public class BreakException extends EvaluationException {
|
public class BreakException extends EvaluationException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ -1,5 +1,29 @@
|
|||||||
|
// $Id$
|
||||||
|
/*
|
||||||
|
* WorldEdit
|
||||||
|
* Copyright (C) 2010, 2011 sk89q <http://www.sk89q.com>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.expression.runtime;
|
package com.sk89q.worldedit.expression.runtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An if/else statement.
|
||||||
|
*
|
||||||
|
* @author TomyLobo
|
||||||
|
*/
|
||||||
public class Conditional extends Node {
|
public class Conditional extends Node {
|
||||||
RValue condition;
|
RValue condition;
|
||||||
RValue truePart;
|
RValue truePart;
|
||||||
|
@ -1,3 +1,22 @@
|
|||||||
|
// $Id$
|
||||||
|
/*
|
||||||
|
* WorldEdit
|
||||||
|
* Copyright (C) 2010, 2011 sk89q <http://www.sk89q.com>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.expression.runtime;
|
package com.sk89q.worldedit.expression.runtime;
|
||||||
|
|
||||||
import com.sk89q.worldedit.expression.ExpressionException;
|
import com.sk89q.worldedit.expression.ExpressionException;
|
||||||
|
@ -1,5 +1,29 @@
|
|||||||
|
// $Id$
|
||||||
|
/*
|
||||||
|
* WorldEdit
|
||||||
|
* Copyright (C) 2010, 2011 sk89q <http://www.sk89q.com>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.expression.runtime;
|
package com.sk89q.worldedit.expression.runtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A Java/C-style for loop.
|
||||||
|
*
|
||||||
|
* @author TomyLobo
|
||||||
|
*/
|
||||||
public class For extends Node {
|
public class For extends Node {
|
||||||
RValue init;
|
RValue init;
|
||||||
RValue condition;
|
RValue condition;
|
||||||
|
@ -25,7 +25,7 @@ import java.lang.reflect.InvocationTargetException;
|
|||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper for a Java method and its arguments (other Invokables)
|
* Wrapper for a Java method and its arguments (other Nodes)
|
||||||
*
|
*
|
||||||
* @author TomyLobo
|
* @author TomyLobo
|
||||||
*/
|
*/
|
||||||
|
@ -22,7 +22,7 @@ package com.sk89q.worldedit.expression.runtime;
|
|||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper for a Java method and its arguments (other Invokables)
|
* Wrapper for a pair of Java methods and their arguments (other Nodes), forming an LValue
|
||||||
*
|
*
|
||||||
* @author TomyLobo
|
* @author TomyLobo
|
||||||
*/
|
*/
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
package com.sk89q.worldedit.expression.runtime;
|
package com.sk89q.worldedit.expression.runtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A value that can be used on the right side of an assignment.
|
* A node in the execution tree of an expression.
|
||||||
*
|
*
|
||||||
* @author TomyLobo
|
* @author TomyLobo
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,29 @@
|
|||||||
|
// $Id$
|
||||||
|
/*
|
||||||
|
* WorldEdit
|
||||||
|
* Copyright (C) 2010, 2011 sk89q <http://www.sk89q.com>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.expression.runtime;
|
package com.sk89q.worldedit.expression.runtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A return statement.
|
||||||
|
*
|
||||||
|
* @author TomyLobo
|
||||||
|
*/
|
||||||
public class Return extends Node {
|
public class Return extends Node {
|
||||||
RValue value;
|
RValue value;
|
||||||
|
|
||||||
|
@ -1,5 +1,30 @@
|
|||||||
|
// $Id$
|
||||||
|
/*
|
||||||
|
* WorldEdit
|
||||||
|
* Copyright (C) 2010, 2011 sk89q <http://www.sk89q.com>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.expression.runtime;
|
package com.sk89q.worldedit.expression.runtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Thrown when a return statement is encountered.
|
||||||
|
* {@link com.sk89q.worldedit.expression.Expression#evaluate} catches this exception and returns the enclosed value.
|
||||||
|
*
|
||||||
|
* @author TomyLobo
|
||||||
|
*/
|
||||||
public class ReturnException extends EvaluationException {
|
public class ReturnException extends EvaluationException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ -1,5 +1,29 @@
|
|||||||
|
// $Id$
|
||||||
|
/*
|
||||||
|
* WorldEdit
|
||||||
|
* Copyright (C) 2010, 2011 sk89q <http://www.sk89q.com>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.expression.runtime;
|
package com.sk89q.worldedit.expression.runtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple-style for loop.
|
||||||
|
*
|
||||||
|
* @author TomyLobo
|
||||||
|
*/
|
||||||
public class SimpleFor extends Node {
|
public class SimpleFor extends Node {
|
||||||
LValue counter;
|
LValue counter;
|
||||||
RValue first;
|
RValue first;
|
||||||
|
@ -1,5 +1,29 @@
|
|||||||
|
// $Id$
|
||||||
|
/*
|
||||||
|
* WorldEdit
|
||||||
|
* Copyright (C) 2010, 2011 sk89q <http://www.sk89q.com>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.expression.runtime;
|
package com.sk89q.worldedit.expression.runtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A while loop.
|
||||||
|
*
|
||||||
|
* @author TomyLobo
|
||||||
|
*/
|
||||||
public class While extends Node {
|
public class While extends Node {
|
||||||
RValue condition;
|
RValue condition;
|
||||||
RValue body;
|
RValue body;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren