1/* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 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 */ 15 16enum Colors { 17 Red, 18 Orange, 19 Yellow 20} 21 22enum Numbers { 23 A = 10, 24 B = 2.57, 25 C = 0x2B7F, 26 D = -1.5, 27} 28 29enum Direction { 30 Up = 'UP', 31 Down = 'DOWN', 32 Left = 'LEFT', 33 Right = 'RIGHT', 34 Across = 'UP'+'LEFT', 35} 36 37enum FileAccess { 38 None, 39 Read = 1 << 1, 40 Write = 1 << 2, 41 ReadWrite = Read | Write, 42} 43 44const constVar = 25; 45let letVar = 50; 46 47enum ExprInits { 48 A = constVar, 49 B = letVar, 50 C = A, 51 D = Direction.Right, 52 E = Numbers.C, 53 H = '123'.length, 54 I = 1 && 2, 55} 56