• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
16import {
17    global,
18    passNode,
19    passNodeArray,
20    unpackNonNullableNode,
21    unpackNode,
22    unpackNodeArray,
23    assertValidPeer,
24    AstNode,
25    Es2pandaAstNodeType,
26    KNativePointer,
27    nodeByType,
28    ArktsObject,
29    unpackString
30} from "../../reexport-for-generated"
31
32export class SrcDumper extends ArktsObject {
33     constructor(pointer: KNativePointer) {
34        super(pointer)
35
36    }
37    static createSrcDumper(node?: AstNode): SrcDumper {
38        return new SrcDumper(global.generatedEs2panda._CreateSrcDumper(global.context, passNode(node)))
39    }
40    /** @deprecated */
41    add(str: string): this {
42        global.generatedEs2panda._SrcDumperAdd(global.context, this.peer, str)
43        return this
44    }
45    /** @deprecated */
46    add1(i: number): this {
47        global.generatedEs2panda._SrcDumperAdd1(global.context, this.peer, i)
48        return this
49    }
50    /** @deprecated */
51    add2(l: number): this {
52        global.generatedEs2panda._SrcDumperAdd2(global.context, this.peer, l)
53        return this
54    }
55    /** @deprecated */
56    add3(f: number): this {
57        global.generatedEs2panda._SrcDumperAdd3(global.context, this.peer, f)
58        return this
59    }
60    /** @deprecated */
61    add4(d: number): this {
62        global.generatedEs2panda._SrcDumperAdd4(global.context, this.peer, d)
63        return this
64    }
65    get str(): string {
66        return unpackString(global.generatedEs2panda._SrcDumperStrConst(global.context, this.peer))
67    }
68    /** @deprecated */
69    incrIndent(): this {
70        global.generatedEs2panda._SrcDumperIncrIndent(global.context, this.peer)
71        return this
72    }
73    /** @deprecated */
74    decrIndent(): this {
75        global.generatedEs2panda._SrcDumperDecrIndent(global.context, this.peer)
76        return this
77    }
78    /** @deprecated */
79    endl(num: number): this {
80        global.generatedEs2panda._SrcDumperEndl(global.context, this.peer, num)
81        return this
82    }
83}