1# Copyright 2021 Google Inc. All Rights Reserved. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14"""Token subtypes used to improve formatting.""" 15 16NONE = 0 17UNARY_OPERATOR = 1 18BINARY_OPERATOR = 2 19SUBSCRIPT_COLON = 3 20SUBSCRIPT_BRACKET = 4 21DEFAULT_OR_NAMED_ASSIGN = 5 22DEFAULT_OR_NAMED_ASSIGN_ARG_LIST = 6 23VARARGS_LIST = 7 24VARARGS_STAR = 8 25KWARGS_STAR_STAR = 9 26ASSIGN_OPERATOR = 10 27DICTIONARY_KEY = 11 28DICTIONARY_KEY_PART = 12 29DICTIONARY_VALUE = 13 30DICT_SET_GENERATOR = 14 31COMP_EXPR = 15 32COMP_FOR = 16 33COMP_IF = 17 34FUNC_DEF = 18 35DECORATOR = 19 36TYPED_NAME = 20 37TYPED_NAME_ARG_LIST = 21 38SIMPLE_EXPRESSION = 22 39PARAMETER_START = 23 40PARAMETER_STOP = 24 41