Packages

abstract class Function[R] extends Postfix[R] with Precedence[R]

Represents a function.

A function can have zero or more arguments. Immediately following the function, there should be a pair of brackets, within which there should be the arguments to the function. The arguments to the function should be separated by the ArgSeparator token.

For example, in sin(4), sin is a function that accepts one argument. Similarly, in max(3, 4), max is a function that accepts two arguments, and ',' is an argument separator.

R

The type that the evaluator should return after evaluating the tokens

Source
Token.scala
Linear Supertypes
Precedence[R], Postfix[R], Token[R], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Function
  2. Precedence
  3. Postfix
  4. Token
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Function(args: Int)

    args

    The number of arguments this function accepts

Abstract Value Members

  1. abstract def apply(args: Seq[R]): R

    Applies the function on the given arguments and returns the result.

    Applies the function on the given arguments and returns the result.

    args

    The arguments to apply the function on. The length of this parameter will always be the number of arguments this function accepts.

    returns

    The result of applying the function on the input arguments

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val args: Int
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  16. def precedence: Int

    The precedence of the function, that is, the priority with which it should be evaluated.

    The precedence of the function, that is, the priority with which it should be evaluated.

    By default this is Int.MaxValue to indicate highest priority.

    returns

    The precedence of the function

    Definition Classes
    Function → Precedence
  17. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Precedence[R]

Inherited from Postfix[R]

Inherited from Token[R]

Inherited from AnyRef

Inherited from Any

Ungrouped