Virgil Language Reference: keywords

This reference page contains a complete listing of the keywords in the Virgil language. As keywords are added to the language, they are tracked separately.

Virgil I-01

The initial version of the Virgil language, version I-01, defines the following set of keywords:

  • and - operator. Denotes the logical and operation on booleans.
  • atomic - statement. Reserved for future language additions.
  • break - statement. Breaks out of the nearest enclosing loop.
  • class - declarator. Begins the declaration of a named class.
  • component - declarator. Begins the declaration of a named component.
  • constructor - declarator. Begins the declaration of the constructor method for a class or component.
  • continue - statement. Returns the beginning of the nearest enclosing loop.
  • default - switch case. Denotes the default case of a switch statement.
  • do - loop statement. Begins a do...while loop.
  • else - control statement. Defines the optional else branch of an if statement.
  • extends - declarator. Defines the parent class for the current class being declared.
  • field - declarator. Begins the declaration of a field in a class or component.
  • for - loop statement. Begins the declaration of a for loop.
  • function - type constructor. Begins the declaration of a delegate type.
  • if - control statement. Begins the declaration of an if statement.
  • instanceof - operator. Denotes a dynamic type query operation on an object.
  • local - declarator. Begins the declaration of a local variable within a method.
  • method - declarator. Begins the declaration of a method in a class or component.
  • new - operator. Denotes allocation of a class or array.
  • or - operator. Denotes the logical or operation on booleans.
  • private - modifier. Denotes that the declared field or method is private.
  • return - statement. Causes control to return out of the current method to the called method, with specified return value (if any).
  • super - statement. Performs a call to the constructor of this class's super class before executing the current constructor.
  • switch - control statement. Branches to one of several case bodies.
  • this - expression. Denotes the this parameter of an instance method of a class.
  • while - loop statement. Denotes a while loop.
  • program - declarator. Begins master program declaration.
  • module - declarator. Reserved for future language additions.
  • entrypoint - declarator. Declares a named entrypoint into the program.
  • components - declarator. Declares the included components of a program.