• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2023 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}
27
28enum Direction {
29  Up = 'UP',
30  Down = 'DOWN',
31  Left = 'LEFT',
32  Right = 'RIGHT',
33  Across = 'UP'+'LEFT',
34}
35
36enum FileAccess {
37  None,
38  Read = 1 << 1,
39  Write = 1 << 2,
40  ReadWrite = Read | Write,
41}
42
43const constVar = 25;
44let letVar = 50;
45
46enum ExprInits {
47  A = constVar,
48  B = letVar,
49  C = A,
50  D = Direction.Right,
51  E = Numbers.C,
52  H = '123'.length,
53  I = 1 && 2,
54}
55