Available Methods
- name ( )
- FUNCTION
- ASSIGN
- STRING
- GETPROP
- FOR
- CALL
- VAR
- OR
- BLOCK
- NUMBER
- DO
- OBJECTLIT
- BITAND
- MUL
- WHILE
- AND
- VOID
- ADD
- HOOK
- FALSE
- NOT
- BITOR
- EXPR_RESULT
- BITXOR
- NEG
- IF
- COMMA
- ARRAYLIT
- TRUE
- NULL
- URSH
- GT
- LSH
- SHEQ
- MOD
- TRY
- BITNOT
- SUB
- LE
- NE
- EQ
- ASSIGN_SUB
- GE
- NEW
- ASSIGN_RSH
- SCRIPT
- POS
- LT
- ASSIGN_MUL
- GETELEM
- DIV
- INSTANCEOF
- ASSIGN_BITAND
- ASSIGN_ADD
- RSH
- THIS
- ASSIGN_MOD
- SHNE
- INC
- ASSIGN_URSH
- IN
- LABEL
- ASSIGN_DIV
- EMPTY
- TYPEOF
- ASSIGN_BITXOR
- REGEXP
- CATCH
- ASSIGN_BITOR
- DEC
- SWITCH
- ASSIGN_LSH
- CASE
- WITH
- THROW
- DELPROP
- RETURN
- STRING_KEY
- GETTER_DEF
- SETTER_DEF
- LP
- DEFAULT_CASE
- PARAM_LIST
- SET
- CONTINUE
- GET
- BREAK
- DEFAULT
- GET_REF
- CAST
- LABEL_NAME
- DEBUGGER
- REF_SPECIAL
- COLON
- CONST
- ERROR
- IMPORT
- TARGET
- TYPEOFNAME
- ESCXMLATTR
- LC
- IFNE
- EQUALS
- RC
- FINALLY
- REF_MEMBER
- LB
- IFEQ
- REF_NAME
- SETELEM
- ELSE
- SETPROP_OP
- DEFAULTNAMESPACE
- SET_REF
- BINDNAME
- RETHROW
- UNDEFINED_TYPE
- DOT
- COLONCOLON
- DEL_REF
- STAR
- DOTQUERY
- GETVAR
- QMARK
- ENUM_NEXT
- SETPROP
- LEAVEWITH
- SETCONST
Related Classes
- java.util.Arrays
- java.util.Collections
- java.util.concurrent.Callable
- java.util.logging.Level
- com.google.common.collect.Lists
- com.google.common.collect.ImmutableList
- javax.annotation.Nullable
- com.google.common.collect.Maps
- com.google.common.collect.Sets
- com.google.common.base.Preconditions
- com.google.common.collect.ImmutableSet
- com.google.common.base.Joiner
- com.google.common.annotations.VisibleForTesting
- com.google.common.base.Predicate
- com.google.common.base.Predicates
- com.google.javascript.rhino.jstype.FunctionType
- com.google.javascript.rhino.jstype.ObjectType
- com.google.javascript.rhino.jstype.JSTypeRegistry
- com.google.javascript.rhino.jstype.JSType
- com.google.javascript.rhino.JSTypeExpression
- com.google.javascript.rhino.jstype.JSTypeNative
- com.google.javascript.jscomp.CompilerOptions.LanguageMode
- com.google.javascript.rhino.JSDocInfo.Visibility
- com.google.javascript.rhino.JSDocInfo
- com.google.javascript.rhino.Node
Java Code Examples for com.google.javascript.rhino.Token#UNDEFINED_TYPE
The following examples show how to use
com.google.javascript.rhino.Token#UNDEFINED_TYPE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TypeAnnotationPass.java From clutz with MIT License | 5 votes |
/** Returns whether a union type contains `undefined`. */ private static boolean unionContainsUndefined(TypeDeclarationNode union) { for (Node unionChild : union.children()) { if (unionChild.getToken() == Token.UNDEFINED_TYPE) { return true; } } return false; }
Example 2
Source File: TypeAnnotationPass.java From clutz with MIT License | 5 votes |
/** Converts a union type to one without `undefined`, if it is present, detaching the original union. */ private static TypeDeclarationNode getUnionTypeNoUndefined(TypeDeclarationNode union) { List<TypeDeclarationNode> nonUndefinedChildren = new ArrayList<>(); for (Node unionChild : union.children()) { if (unionChild.getToken() != Token.UNDEFINED_TYPE) { nonUndefinedChildren.add((TypeDeclarationNode) unionChild); } } union.detachChildren(); return unionType(nonUndefinedChildren); }