@galacean/engine-shaderlab 1.6.0-alpha.1 → 1.6.0-beta.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.
- package/dist/browser.js +6325 -4885
- package/dist/browser.js.map +1 -1
- package/dist/browser.min.js +1 -1
- package/dist/browser.min.js.map +1 -1
- package/dist/browser.verbose.js +5956 -4985
- package/dist/browser.verbose.js.map +1 -1
- package/dist/browser.verbose.min.js +1 -1
- package/dist/browser.verbose.min.js.map +1 -1
- package/dist/main.js +6325 -4885
- package/dist/main.js.map +1 -1
- package/dist/main.verbose.js +5956 -4985
- package/dist/main.verbose.js.map +1 -1
- package/dist/module.js +6325 -4887
- package/dist/module.js.map +1 -1
- package/dist/module.verbose.js +5958 -4986
- package/dist/module.verbose.js.map +1 -1
- package/package.json +4 -4
- package/types/GSError.d.ts +2 -1
- package/types/ParserUtils.d.ts +1 -1
- package/types/Preprocessor.d.ts +31 -0
- package/types/ShaderLab.d.ts +15 -1
- package/types/codeGen/CodeGenVisitor.d.ts +1 -2
- package/types/codeGen/GLES100.d.ts +4 -8
- package/types/codeGen/GLES300.d.ts +9 -6
- package/types/codeGen/types.d.ts +2 -2
- package/types/common/BaseLexer.d.ts +2 -0
- package/types/common/IBaseSymbol.d.ts +5 -0
- package/types/common/SymbolTable.d.ts +7 -0
- package/types/common/SymbolTableStack.d.ts +13 -0
- package/types/common/enums/Keyword.d.ts +108 -0
- package/types/common/index.d.ts +1 -1
- package/types/common/types.d.ts +4 -5
- package/types/index.d.ts +0 -1
- package/types/lalr/CFG.d.ts +1 -1
- package/types/lexer/Lexer.d.ts +10 -5
- package/types/{preprocessor → macroProcessor}/MacroDefine.d.ts +2 -2
- package/types/macroProcessor/MacroParserLexer.d.ts +32 -0
- package/types/macroProcessor/Utils.d.ts +5 -0
- package/types/{preprocessor → macroProcessor}/constants.d.ts +4 -6
- package/types/macroProcessor/index.d.ts +1 -0
- package/types/parser/AST.d.ts +124 -23
- package/types/parser/GrammarSymbol.d.ts +21 -1
- package/types/parser/ShaderInfo.d.ts +4 -2
- package/types/parser/ShaderTargetParser.d.ts +3 -2
- package/types/parser/builtin/functions.d.ts +2 -1
- package/types/parser/builtin/variables.d.ts +1 -1
- package/types/parser/symbolTable/SymbolInfo.d.ts +12 -8
- package/types/parser/symbolTable/index.d.ts +1 -1
- package/types/parser/types.d.ts +7 -6
- package/types/sourceParser/ShaderSourceFactory.d.ts +8 -0
- package/types/sourceParser/ShaderSourceSymbol.d.ts +10 -0
- package/types/sourceParser/SourceLexer.d.ts +19 -0
- package/types/sourceParser/index.d.ts +1 -0
- package/types/common/BaseScanner.d.ts +0 -2
- package/types/common/BaseSymbolTable.d.ts +0 -18
- package/types/common/Keywords.d.ts +0 -99
- package/types/contentParser/ContentSymbolTable.d.ts +0 -10
- package/types/contentParser/KeywordMap.d.ts +0 -2
- package/types/contentParser/Scanner.d.ts +0 -10
- package/types/contentParser/index.d.ts +0 -1
- package/types/lexer/Utils.d.ts +0 -7
- package/types/parser/symbolTable/TargetSymbolTable.d.ts +0 -13
- package/types/preprocessor/PpScanner.d.ts +0 -51
- package/types/preprocessor/Preprocessor.d.ts +0 -1
- package/types/preprocessor/Utils.d.ts +0 -10
- package/types/preprocessor/index.d.ts +0 -1
- /package/types/common/{Enums.d.ts → enums/ShaderStage.d.ts} +0 -0
- /package/types/{preprocessor/PpParser.d.ts → macroProcessor/MacroParser.d.ts} +0 -0
- /package/types/{preprocessor → macroProcessor}/sourceMap/index.d.ts +0 -0
- /package/types/{contentParser/ShaderContentParser.d.ts → sourceParser/ShaderSourceParser.d.ts} +0 -0
|
@@ -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 +0,0 @@
|
|
|
1
|
-
export * from "./Preprocessor";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/types/{contentParser/ShaderContentParser.d.ts → sourceParser/ShaderSourceParser.d.ts}
RENAMED
|
File without changes
|