@galacean/engine-shaderlab 0.0.0-experimental-1.4-small-language.4 → 0.0.0-experimental-backup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/package.json +4 -4
  2. package/dist/browser.js +0 -6608
  3. package/dist/browser.js.map +0 -1
  4. package/dist/browser.min.js +0 -2
  5. package/dist/browser.min.js.map +0 -1
  6. package/dist/browser.verbose.js +0 -7866
  7. package/dist/browser.verbose.js.map +0 -1
  8. package/dist/browser.verbose.min.js +0 -2
  9. package/dist/browser.verbose.min.js.map +0 -1
  10. package/dist/main.js +0 -6604
  11. package/dist/main.js.map +0 -1
  12. package/dist/main.verbose.js +0 -7862
  13. package/dist/main.verbose.js.map +0 -1
  14. package/dist/module.js +0 -6599
  15. package/dist/module.js.map +0 -1
  16. package/dist/module.verbose.js +0 -7854
  17. package/dist/module.verbose.js.map +0 -1
  18. package/types/GSError.d.ts +0 -15
  19. package/types/ParserUtils.d.ts +0 -12
  20. package/types/ShaderLab.d.ts +0 -1
  21. package/types/ShaderLabUtils.d.ts +0 -10
  22. package/types/TempArray.d.ts +0 -5
  23. package/types/codeGen/CodeGenVisitor.d.ts +0 -2
  24. package/types/codeGen/GLES100.d.ts +0 -16
  25. package/types/codeGen/GLES300.d.ts +0 -17
  26. package/types/codeGen/GLESVisitor.d.ts +0 -1
  27. package/types/codeGen/VisitorContext.d.ts +0 -1
  28. package/types/codeGen/index.d.ts +0 -3
  29. package/types/codeGen/types.d.ts +0 -12
  30. package/types/common/BaseScanner.d.ts +0 -2
  31. package/types/common/BaseSymbolTable.d.ts +0 -18
  32. package/types/common/BaseToken.d.ts +0 -12
  33. package/types/common/Enums.d.ts +0 -5
  34. package/types/common/Keywords.d.ts +0 -99
  35. package/types/common/ShaderPosition.d.ts +0 -8
  36. package/types/common/ShaderRange.d.ts +0 -8
  37. package/types/common/index.d.ts +0 -5
  38. package/types/common/types.d.ts +0 -102
  39. package/types/contentParser/ContentSymbolTable.d.ts +0 -10
  40. package/types/contentParser/KeywordMap.d.ts +0 -2
  41. package/types/contentParser/Scanner.d.ts +0 -10
  42. package/types/contentParser/ShaderContentParser.d.ts +0 -1
  43. package/types/contentParser/index.d.ts +0 -1
  44. package/types/index.d.ts +0 -4
  45. package/types/lalr/CFG.d.ts +0 -5
  46. package/types/lalr/LALR1.d.ts +0 -26
  47. package/types/lalr/Production.d.ts +0 -9
  48. package/types/lalr/State.d.ts +0 -20
  49. package/types/lalr/StateItem.d.ts +0 -20
  50. package/types/lalr/Utils.d.ts +0 -22
  51. package/types/lalr/index.d.ts +0 -2
  52. package/types/lalr/types.d.ts +0 -14
  53. package/types/lexer/Lexer.d.ts +0 -18
  54. package/types/lexer/Utils.d.ts +0 -7
  55. package/types/lexer/index.d.ts +0 -1
  56. package/types/parser/AST.d.ts +0 -347
  57. package/types/parser/Grammar.d.ts +0 -11
  58. package/types/parser/GrammarSymbol.d.ts +0 -107
  59. package/types/parser/SemanticAnalyzer.d.ts +0 -2
  60. package/types/parser/ShaderInfo.d.ts +0 -8
  61. package/types/parser/ShaderTargetParser.d.ts +0 -23
  62. package/types/parser/builtin/functions.d.ts +0 -34
  63. package/types/parser/builtin/index.d.ts +0 -2
  64. package/types/parser/builtin/variables.d.ts +0 -11
  65. package/types/parser/index.d.ts +0 -2
  66. package/types/parser/symbolTable/FnSymbol.d.ts +0 -6
  67. package/types/parser/symbolTable/StructSymbol.d.ts +0 -6
  68. package/types/parser/symbolTable/SymbolDataType.d.ts +0 -8
  69. package/types/parser/symbolTable/SymbolInfo.d.ts +0 -18
  70. package/types/parser/symbolTable/TargetSymbolTable.d.ts +0 -13
  71. package/types/parser/symbolTable/VarSymbol.d.ts +0 -8
  72. package/types/parser/symbolTable/index.d.ts +0 -6
  73. package/types/parser/types.d.ts +0 -23
  74. package/types/preprocessor/MacroDefine.d.ts +0 -13
  75. package/types/preprocessor/PpParser.d.ts +0 -7
  76. package/types/preprocessor/PpScanner.d.ts +0 -51
  77. package/types/preprocessor/Preprocessor.d.ts +0 -1
  78. package/types/preprocessor/Utils.d.ts +0 -10
  79. package/types/preprocessor/constants.d.ts +0 -56
  80. package/types/preprocessor/index.d.ts +0 -1
  81. package/types/preprocessor/sourceMap/index.d.ts +0 -37
@@ -1,7 +0,0 @@
1
- import { ShaderRange } from "../common";
2
- import { BlockInfo } from "./sourceMap";
3
- export interface ExpandSegment {
4
- block?: BlockInfo;
5
- rangeInBlock: ShaderRange;
6
- replace: string;
7
- }
@@ -1,51 +0,0 @@
1
- import { ShaderRange, ShaderPosition } from "../common";
2
- import PpSourceMap from "./sourceMap";
3
- import BaseScanner from "../common/BaseScanner";
4
- import { BaseToken } from "../common/BaseToken";
5
- import { EPpToken } from "./constants";
6
- export type OnToken = (token: BaseToken, scanner: PpScanner) => void;
7
- export default class PpScanner extends BaseScanner {
8
- private macroLvl;
9
- readonly sourceMap: PpSourceMap;
10
- readonly file: string;
11
- readonly blockRange?: ShaderRange;
12
- constructor(source: string, file?: string, blockRange?: ShaderRange);
13
- /**
14
- * Advance to directive
15
- * @param expandOnToken callback on encountering token.
16
- */
17
- scanDirective(expandOnToken?: OnToken): BaseToken<number>;
18
- /**
19
- * @param nonLetterChar should not be space
20
- */
21
- scanWordsUntilChar(nonLetterChar: string): BaseToken[];
22
- scanWord(skipNonLetter?: boolean): BaseToken;
23
- /**
24
- * @param offset - Offset from starting point
25
- */
26
- getShaderPosition(offset: number): ShaderPosition;
27
- /**
28
- * @param onToken callback when encounter a token
29
- * @returns token split by space
30
- */
31
- scanToken(onToken?: OnToken): BaseToken | undefined;
32
- scanQuotedString(): BaseToken<EPpToken.string_const>;
33
- scanToChar(char: string): void;
34
- scanMacroBranchChunk(): {
35
- token: BaseToken<EPpToken.chunk>;
36
- nextDirective: BaseToken;
37
- };
38
- scanPairedBlock(lc: string, rc: string): void;
39
- /**
40
- * @returns end ShaderPosition
41
- */
42
- scanRemainMacro(): ShaderPosition;
43
- peekNonSpace(): string;
44
- scanInteger(): BaseToken<number>;
45
- /**
46
- * Skip comments
47
- */
48
- scanLineRemain(): BaseToken<number>;
49
- private _advanceToDirective;
50
- private _skipComments;
51
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import { ShaderRange } from "../common";
2
- import { ExpandSegment } from "./PpParser";
3
- import PpSourceMap from "./sourceMap";
4
- export declare class PpUtils {
5
- static expand(segments: ExpandSegment[], source: string, sourceMap?: PpSourceMap): string;
6
- static assembleSegments(segments: {
7
- range: ShaderRange;
8
- replace: string;
9
- }[], source: string): string;
10
- }
@@ -1,56 +0,0 @@
1
- export declare enum EPpToken {
2
- id = 0,
3
- line_remain = 1,
4
- chunk = 2,
5
- int_constant = 3,
6
- string_const = 4,
7
- /** \>> */
8
- right_op = 5,
9
- /** << */
10
- left_op = 6,
11
- left_paren = 7,
12
- right_paren = 8,
13
- /** \>= */
14
- ge = 9,
15
- /** <= */
16
- le = 10,
17
- /** == */
18
- eq = 11,
19
- /** != */
20
- neq = 12,
21
- /** && */
22
- and = 13,
23
- /** || */
24
- or = 14,
25
- /** < */
26
- left_angle = 15,
27
- /** \> */
28
- right_angle = 16,
29
- /** \* */
30
- star = 17,
31
- /** + */
32
- plus = 18,
33
- /** \- */
34
- dash = 19,
35
- /** ! */
36
- bang = 20,
37
- /** \/ */
38
- slash = 21,
39
- /** % */
40
- percent = 22,
41
- EOF = 100
42
- }
43
- export declare enum EPpKeyword {
44
- define = 101,
45
- undef = 102,
46
- if = 103,
47
- ifdef = 104,
48
- ifndef = 105,
49
- else = 106,
50
- elif = 107,
51
- endif = 108,
52
- include = 109,
53
- defined = 110
54
- }
55
- export declare const PpKeyword: Map<string, EPpKeyword>;
56
- export type PpConstant = boolean | number;
@@ -1 +0,0 @@
1
- export * from "./Preprocessor";
@@ -1,37 +0,0 @@
1
- import { ShaderRange } from "../../common/ShaderRange";
2
- export declare class BlockInfo {
3
- readonly sourceFile: string;
4
- readonly rangeInFile?: ShaderRange;
5
- readonly sourceMap?: PpSourceMap;
6
- constructor(sourceFile?: string, rangeInFile?: ShaderRange, sourceMap?: PpSourceMap);
7
- }
8
- export declare class MapRange {
9
- sourceLoc: {
10
- block: BlockInfo;
11
- rangeInBlock: ShaderRange;
12
- };
13
- generatedLoc: {
14
- start: number;
15
- end: number;
16
- };
17
- constructor(sourceBlock: BlockInfo, rangeInBlock: ShaderRange, generatedLoc: {
18
- start: number;
19
- end: number;
20
- });
21
- getSourceIndex(generatedIdx: number): {
22
- sourceFile: string;
23
- index: number;
24
- };
25
- }
26
- export default class PpSourceMap {
27
- readonly mapRanges: MapRange[];
28
- static rangeContains(range: MapRange["generatedLoc"], index: number): boolean;
29
- addMapRange(mapRange: MapRange): void;
30
- /**
31
- * @returns index
32
- */
33
- map(index: number): {
34
- sourceFile: string;
35
- index: number;
36
- };
37
- }