JavaFX Reserved Words and Syntax Highlighter

Posted: May 2nd, 2009 under JavaFX.
Tags: , , , , ,

Recently, when I was writing some articles on JavaFX, I found it necessary to obtain a list of reserved words(keywords) of JavaFX so that I could use them in a syntax highlighter for blogs and web pages. After some search, I found them at openjfx site. Since the keywords may be useful for other purposes, I list them below ( for JavaFX 1.1):

abstract after and as assert at attribute before bind bound break
catch class continue def delete else exclusive extends false finally
first for from function if import indexof in init insert instanceof
into inverse last lazy mixin mod new not null on or override
package postinit private protected public-init public public-read
replace return reverse sizeof static step super then this throw
trigger true try tween typeof var where while with

Here is a sample of the JavaFX syntax highlighter, if you are intersted, check it out here: JavaFX syntax highlighter.

package pacman;
import java.lang.Math;
import pacman.MazeData;
import pacman.PacMan;

/**
 * @author Henry Zhang
 */

public class MoveDecision {

  // x and y of an intended move
  public var x: Number;
  public var y: Number;

  // evaluate if the move is valid and its score if it's valid
  public function evaluate(pacMan:PacMan, isHollow:Boolean): Void {
    if ( x < 1 or y < 1 or y >= MazeData.GRID_SIZE
         or x >= MazeData.GRID_SIZE){
      score = -1;
      return ;
    }
  }
 . . .
}

No Comments

No comments yet.

RSS feed for comments on this post.