brighterscript 1.0.0-alpha.1 → 1.0.0-alpha.13
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/CHANGELOG.md +362 -248
- package/README.md +2 -2
- package/bsconfig.schema.json +1 -1
- package/dist/CodeActionUtil.d.ts +11 -2
- package/dist/CodeActionUtil.js +17 -3
- package/dist/CodeActionUtil.js.map +1 -1
- package/dist/CommentFlagProcessor.d.ts +4 -4
- package/dist/CommentFlagProcessor.js +5 -3
- package/dist/CommentFlagProcessor.js.map +1 -1
- package/dist/DependencyGraph.js.map +1 -1
- package/dist/DiagnosticCollection.js +2 -2
- package/dist/DiagnosticCollection.js.map +1 -1
- package/dist/DiagnosticFilterer.js +3 -3
- package/dist/DiagnosticFilterer.js.map +1 -1
- package/dist/DiagnosticMessages.d.ts +15 -5
- package/dist/DiagnosticMessages.js +19 -9
- package/dist/DiagnosticMessages.js.map +1 -1
- package/dist/LanguageServer.d.ts +11 -10
- package/dist/LanguageServer.js +87 -58
- package/dist/LanguageServer.js.map +1 -1
- package/dist/Logger.d.ts +2 -0
- package/dist/Logger.js +5 -3
- package/dist/Logger.js.map +1 -1
- package/dist/Program.d.ts +76 -46
- package/dist/Program.js +254 -180
- package/dist/Program.js.map +1 -1
- package/dist/ProgramBuilder.d.ts +7 -7
- package/dist/ProgramBuilder.js +37 -43
- package/dist/ProgramBuilder.js.map +1 -1
- package/dist/Scope.d.ts +33 -23
- package/dist/Scope.js +222 -147
- package/dist/Scope.js.map +1 -1
- package/dist/SemanticTokenUtils.d.ts +14 -0
- package/dist/SemanticTokenUtils.js +81 -0
- package/dist/SemanticTokenUtils.js.map +1 -0
- package/dist/SymbolTable.d.ts +9 -3
- package/dist/SymbolTable.js +40 -13
- package/dist/SymbolTable.js.map +1 -1
- package/dist/XmlScope.d.ts +7 -2
- package/dist/XmlScope.js +67 -29
- package/dist/XmlScope.js.map +1 -1
- package/dist/astUtils/AstEditor.d.ts +27 -0
- package/dist/astUtils/AstEditor.js +97 -0
- package/dist/astUtils/AstEditor.js.map +1 -0
- package/dist/astUtils/AstEditor.spec.d.ts +1 -0
- package/dist/astUtils/AstEditor.spec.js +133 -0
- package/dist/astUtils/AstEditor.spec.js.map +1 -0
- package/dist/astUtils/creators.d.ts +15 -1
- package/dist/astUtils/creators.js +39 -9
- package/dist/astUtils/creators.js.map +1 -1
- package/dist/astUtils/creators.spec.js +4 -4
- package/dist/astUtils/creators.spec.js.map +1 -1
- package/dist/astUtils/index.js +1 -1
- package/dist/astUtils/reflection.d.ts +20 -8
- package/dist/astUtils/reflection.js +42 -1
- package/dist/astUtils/reflection.js.map +1 -1
- package/dist/astUtils/reflection.spec.js +115 -115
- package/dist/astUtils/reflection.spec.js.map +1 -1
- package/dist/astUtils/stackedVisitor.js.map +1 -1
- package/dist/astUtils/stackedVisitor.spec.js +13 -13
- package/dist/astUtils/stackedVisitor.spec.js.map +1 -1
- package/dist/astUtils/visitors.js +1 -1
- package/dist/astUtils/visitors.js.map +1 -1
- package/dist/astUtils/visitors.spec.js +28 -28
- package/dist/astUtils/visitors.spec.js.map +1 -1
- package/dist/astUtils/xml.d.ts +4 -3
- package/dist/astUtils/xml.js +8 -3
- package/dist/astUtils/xml.js.map +1 -1
- package/dist/bscPlugin/BscPlugin.d.ts +2 -1
- package/dist/bscPlugin/BscPlugin.js +4 -0
- package/dist/bscPlugin/BscPlugin.js.map +1 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +5 -6
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +30 -30
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.d.ts +7 -0
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.js +63 -0
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.js.map +1 -0
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.d.ts +1 -0
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js +45 -0
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js.map +1 -0
- package/dist/diagnosticUtils.d.ts +1 -0
- package/dist/diagnosticUtils.js +14 -7
- package/dist/diagnosticUtils.js.map +1 -1
- package/dist/examples/plugins/removePrint.js +2 -2
- package/dist/examples/plugins/removePrint.js.map +1 -1
- package/dist/files/BrsFile.Class.spec.js +486 -71
- package/dist/files/BrsFile.Class.spec.js.map +1 -1
- package/dist/files/BrsFile.d.ts +48 -23
- package/dist/files/BrsFile.js +403 -233
- package/dist/files/BrsFile.js.map +1 -1
- package/dist/files/BrsFile.spec.js +367 -316
- package/dist/files/BrsFile.spec.js.map +1 -1
- package/dist/files/XmlFile.d.ts +13 -6
- package/dist/files/XmlFile.js +27 -21
- package/dist/files/XmlFile.js.map +1 -1
- package/dist/files/XmlFile.spec.js +274 -228
- package/dist/files/XmlFile.spec.js.map +1 -1
- package/dist/files/tests/imports.spec.js +49 -49
- package/dist/files/tests/imports.spec.js.map +1 -1
- package/dist/globalCallables.d.ts +3 -1
- package/dist/globalCallables.js +359 -87
- package/dist/globalCallables.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +51 -14
- package/dist/lexer/Lexer.d.ts +14 -1
- package/dist/lexer/Lexer.js +91 -21
- package/dist/lexer/Lexer.js.map +1 -1
- package/dist/lexer/Lexer.spec.js +187 -132
- package/dist/lexer/Lexer.spec.js.map +1 -1
- package/dist/lexer/Token.d.ts +2 -2
- package/dist/lexer/TokenKind.d.ts +7 -1
- package/dist/lexer/TokenKind.js +51 -3
- package/dist/lexer/TokenKind.js.map +1 -1
- package/dist/lexer/index.js +2 -1
- package/dist/lexer/index.js.map +1 -1
- package/dist/parser/BrsTranspileState.d.ts +7 -0
- package/dist/parser/BrsTranspileState.js +10 -1
- package/dist/parser/BrsTranspileState.js.map +1 -1
- package/dist/parser/Expression.d.ts +23 -5
- package/dist/parser/Expression.js +124 -75
- package/dist/parser/Expression.js.map +1 -1
- package/dist/parser/Parser.Class.spec.js +159 -60
- package/dist/parser/Parser.Class.spec.js.map +1 -1
- package/dist/parser/Parser.d.ts +114 -26
- package/dist/parser/Parser.js +471 -126
- package/dist/parser/Parser.js.map +1 -1
- package/dist/parser/Parser.spec.js +396 -235
- package/dist/parser/Parser.spec.js.map +1 -1
- package/dist/parser/SGParser.d.ts +41 -4
- package/dist/parser/SGParser.js +186 -175
- package/dist/parser/SGParser.js.map +1 -1
- package/dist/parser/SGParser.spec.js +35 -22
- package/dist/parser/SGParser.spec.js.map +1 -1
- package/dist/parser/SGTypes.d.ts +206 -38
- package/dist/parser/SGTypes.js +470 -161
- package/dist/parser/SGTypes.js.map +1 -1
- package/dist/parser/SGTypes.spec.d.ts +1 -0
- package/dist/parser/SGTypes.spec.js +351 -0
- package/dist/parser/SGTypes.spec.js.map +1 -0
- package/dist/parser/Statement.d.ts +92 -18
- package/dist/parser/Statement.js +287 -58
- package/dist/parser/Statement.js.map +1 -1
- package/dist/parser/Statement.spec.js +11 -11
- package/dist/parser/Statement.spec.js.map +1 -1
- package/dist/parser/TranspileState.d.ts +1 -1
- package/dist/parser/TranspileState.js +15 -7
- package/dist/parser/TranspileState.js.map +1 -1
- package/dist/parser/index.js +1 -1
- package/dist/parser/tests/Parser.spec.d.ts +8 -7
- package/dist/parser/tests/Parser.spec.js +12 -8
- package/dist/parser/tests/Parser.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/For.spec.js +50 -50
- package/dist/parser/tests/controlFlow/For.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/ForEach.spec.js +31 -31
- package/dist/parser/tests/controlFlow/ForEach.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/If.spec.js +174 -156
- package/dist/parser/tests/controlFlow/If.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/While.spec.js +32 -32
- package/dist/parser/tests/controlFlow/While.spec.js.map +1 -1
- package/dist/parser/tests/expression/Additive.spec.js +21 -21
- package/dist/parser/tests/expression/Additive.spec.js.map +1 -1
- package/dist/parser/tests/expression/ArrayLiterals.spec.js +105 -105
- package/dist/parser/tests/expression/ArrayLiterals.spec.js.map +1 -1
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js +148 -124
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js.map +1 -1
- package/dist/parser/tests/expression/Boolean.spec.js +17 -17
- package/dist/parser/tests/expression/Boolean.spec.js.map +1 -1
- package/dist/parser/tests/expression/Call.spec.js +30 -30
- package/dist/parser/tests/expression/Call.spec.js.map +1 -1
- package/dist/parser/tests/expression/Exponential.spec.js +16 -16
- package/dist/parser/tests/expression/Exponential.spec.js.map +1 -1
- package/dist/parser/tests/expression/Function.spec.js +247 -247
- package/dist/parser/tests/expression/Function.spec.js.map +1 -1
- package/dist/parser/tests/expression/Indexing.spec.js +73 -73
- package/dist/parser/tests/expression/Indexing.spec.js.map +1 -1
- package/dist/parser/tests/expression/Multiplicative.spec.js +36 -36
- package/dist/parser/tests/expression/Multiplicative.spec.js.map +1 -1
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +59 -47
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/PrefixUnary.spec.js +35 -35
- package/dist/parser/tests/expression/PrefixUnary.spec.js.map +1 -1
- package/dist/parser/tests/expression/Primary.spec.js +26 -26
- package/dist/parser/tests/expression/Primary.spec.js.map +1 -1
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.d.ts +1 -0
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.js +170 -0
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.js.map +1 -0
- package/dist/parser/tests/expression/Relational.spec.js +42 -42
- package/dist/parser/tests/expression/Relational.spec.js.map +1 -1
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js +8 -8
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js +12 -12
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TernaryExpression.spec.js +100 -100
- package/dist/parser/tests/expression/TernaryExpression.spec.js.map +1 -1
- package/dist/parser/tests/statement/AssignmentOperators.spec.js +35 -35
- package/dist/parser/tests/statement/AssignmentOperators.spec.js.map +1 -1
- package/dist/parser/tests/statement/Declaration.spec.js +39 -39
- package/dist/parser/tests/statement/Declaration.spec.js.map +1 -1
- package/dist/parser/tests/statement/Dim.spec.js +21 -21
- package/dist/parser/tests/statement/Dim.spec.js.map +1 -1
- package/dist/parser/tests/statement/Function.spec.js +192 -192
- package/dist/parser/tests/statement/Function.spec.js.map +1 -1
- package/dist/parser/tests/statement/Goto.spec.js +11 -11
- package/dist/parser/tests/statement/Goto.spec.js.map +1 -1
- package/dist/parser/tests/statement/Increment.spec.js +46 -46
- package/dist/parser/tests/statement/Increment.spec.js.map +1 -1
- package/dist/parser/tests/statement/InterfaceStatement.spec.d.ts +1 -0
- package/dist/parser/tests/statement/InterfaceStatement.spec.js +61 -0
- package/dist/parser/tests/statement/InterfaceStatement.spec.js.map +1 -0
- package/dist/parser/tests/statement/LibraryStatement.spec.js +10 -10
- package/dist/parser/tests/statement/LibraryStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Misc.spec.js +37 -36
- package/dist/parser/tests/statement/Misc.spec.js.map +1 -1
- package/dist/parser/tests/statement/PrintStatement.spec.js +30 -30
- package/dist/parser/tests/statement/PrintStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/ReturnStatement.spec.js +43 -43
- package/dist/parser/tests/statement/ReturnStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Set.spec.js +69 -69
- package/dist/parser/tests/statement/Set.spec.js.map +1 -1
- package/dist/parser/tests/statement/Stop.spec.js +9 -9
- package/dist/parser/tests/statement/Stop.spec.js.map +1 -1
- package/dist/parser/tests/statement/Throw.spec.js +5 -5
- package/dist/parser/tests/statement/Throw.spec.js.map +1 -1
- package/dist/parser/tests/statement/TryCatch.spec.js +13 -13
- package/dist/parser/tests/statement/TryCatch.spec.js.map +1 -1
- package/dist/preprocessor/Chunk.js.map +1 -1
- package/dist/preprocessor/Manifest.d.ts +1 -1
- package/dist/preprocessor/Preprocessor.js +1 -1
- package/dist/preprocessor/Preprocessor.js.map +1 -1
- package/dist/preprocessor/Preprocessor.spec.js +49 -49
- package/dist/preprocessor/Preprocessor.spec.js.map +1 -1
- package/dist/preprocessor/PreprocessorParser.spec.js +72 -72
- package/dist/preprocessor/PreprocessorParser.spec.js.map +1 -1
- package/dist/preprocessor/index.js +1 -1
- package/dist/types/ArrayType.js +5 -4
- package/dist/types/ArrayType.js.map +1 -1
- package/dist/types/ArrayType.spec.js +8 -8
- package/dist/types/ArrayType.spec.js.map +1 -1
- package/dist/types/BooleanType.js +3 -3
- package/dist/types/BooleanType.js.map +1 -1
- package/dist/types/BooleanType.spec.js +2 -2
- package/dist/types/BooleanType.spec.js.map +1 -1
- package/dist/types/BscType.d.ts +19 -5
- package/dist/types/BscType.js +9 -0
- package/dist/types/BscType.js.map +1 -1
- package/dist/types/CustomType.d.ts +8 -5
- package/dist/types/CustomType.js +17 -6
- package/dist/types/CustomType.js.map +1 -1
- package/dist/types/DoubleType.js +8 -8
- package/dist/types/DoubleType.js.map +1 -1
- package/dist/types/DoubleType.spec.js +2 -2
- package/dist/types/DoubleType.spec.js.map +1 -1
- package/dist/types/DynamicType.js +1 -1
- package/dist/types/DynamicType.js.map +1 -1
- package/dist/types/DynamicType.spec.js +2 -2
- package/dist/types/DynamicType.spec.js.map +1 -1
- package/dist/types/FloatType.d.ts +1 -1
- package/dist/types/FloatType.js +8 -8
- package/dist/types/FloatType.js.map +1 -1
- package/dist/types/FloatType.spec.js +2 -2
- package/dist/types/FloatType.spec.js.map +1 -1
- package/dist/types/FunctionType.d.ts +5 -11
- package/dist/types/FunctionType.js +24 -13
- package/dist/types/FunctionType.js.map +1 -1
- package/dist/types/FunctionType.spec.js +11 -5
- package/dist/types/FunctionType.spec.js.map +1 -1
- package/dist/types/IntegerType.d.ts +1 -1
- package/dist/types/IntegerType.js +8 -8
- package/dist/types/IntegerType.js.map +1 -1
- package/dist/types/IntegerType.spec.js +2 -2
- package/dist/types/IntegerType.spec.js.map +1 -1
- package/dist/types/InterfaceType.d.ts +8 -2
- package/dist/types/InterfaceType.js +42 -6
- package/dist/types/InterfaceType.js.map +1 -1
- package/dist/types/InterfaceType.spec.d.ts +1 -0
- package/dist/types/InterfaceType.spec.js +174 -0
- package/dist/types/InterfaceType.spec.js.map +1 -0
- package/dist/types/InvalidType.js +4 -4
- package/dist/types/InvalidType.js.map +1 -1
- package/dist/types/InvalidType.spec.js +2 -2
- package/dist/types/InvalidType.spec.js.map +1 -1
- package/dist/types/LazyType.d.ts +9 -7
- package/dist/types/LazyType.js +22 -10
- package/dist/types/LazyType.js.map +1 -1
- package/dist/types/LongIntegerType.d.ts +1 -1
- package/dist/types/LongIntegerType.js +8 -8
- package/dist/types/LongIntegerType.js.map +1 -1
- package/dist/types/LongIntegerType.spec.js +2 -2
- package/dist/types/LongIntegerType.spec.js.map +1 -1
- package/dist/types/ObjectType.d.ts +7 -4
- package/dist/types/ObjectType.js +6 -3
- package/dist/types/ObjectType.js.map +1 -1
- package/dist/types/ObjectType.spec.js +2 -2
- package/dist/types/ObjectType.spec.js.map +1 -1
- package/dist/types/StringType.js +3 -3
- package/dist/types/StringType.js.map +1 -1
- package/dist/types/StringType.spec.js +2 -2
- package/dist/types/StringType.spec.js.map +1 -1
- package/dist/types/UninitializedType.js +3 -3
- package/dist/types/UninitializedType.js.map +1 -1
- package/dist/types/VoidType.js +3 -3
- package/dist/types/VoidType.js.map +1 -1
- package/dist/types/VoidType.spec.js +2 -2
- package/dist/types/VoidType.spec.js.map +1 -1
- package/dist/types/helpers.d.ts +42 -0
- package/dist/types/helpers.js +113 -0
- package/dist/types/helpers.js.map +1 -0
- package/dist/util.d.ts +77 -17
- package/dist/util.js +247 -59
- package/dist/util.js.map +1 -1
- package/dist/validators/ClassValidator.d.ts +5 -1
- package/dist/validators/ClassValidator.js +59 -24
- package/dist/validators/ClassValidator.js.map +1 -1
- package/package.json +13 -13
package/dist/globalCallables.js
CHANGED
|
@@ -21,7 +21,8 @@ let mathFunctions = [{
|
|
|
21
21
|
file: exports.globalFile,
|
|
22
22
|
params: [{
|
|
23
23
|
name: 'x',
|
|
24
|
-
type: new FloatType_1.FloatType()
|
|
24
|
+
type: new FloatType_1.FloatType(),
|
|
25
|
+
isOptional: false
|
|
25
26
|
}]
|
|
26
27
|
}, {
|
|
27
28
|
name: 'Atn',
|
|
@@ -31,7 +32,8 @@ let mathFunctions = [{
|
|
|
31
32
|
file: exports.globalFile,
|
|
32
33
|
params: [{
|
|
33
34
|
name: 'x',
|
|
34
|
-
type: new FloatType_1.FloatType()
|
|
35
|
+
type: new FloatType_1.FloatType(),
|
|
36
|
+
isOptional: false
|
|
35
37
|
}]
|
|
36
38
|
}, {
|
|
37
39
|
name: 'Cdbl',
|
|
@@ -40,7 +42,8 @@ let mathFunctions = [{
|
|
|
40
42
|
file: exports.globalFile,
|
|
41
43
|
params: [{
|
|
42
44
|
name: 'x',
|
|
43
|
-
type: new IntegerType_1.IntegerType()
|
|
45
|
+
type: new IntegerType_1.IntegerType(),
|
|
46
|
+
isOptional: false
|
|
44
47
|
}]
|
|
45
48
|
}, {
|
|
46
49
|
name: 'Cint',
|
|
@@ -49,7 +52,8 @@ let mathFunctions = [{
|
|
|
49
52
|
file: exports.globalFile,
|
|
50
53
|
params: [{
|
|
51
54
|
name: 'x',
|
|
52
|
-
type: new FloatType_1.FloatType()
|
|
55
|
+
type: new FloatType_1.FloatType(),
|
|
56
|
+
isOptional: false
|
|
53
57
|
}]
|
|
54
58
|
}, {
|
|
55
59
|
name: 'Cos',
|
|
@@ -58,7 +62,8 @@ let mathFunctions = [{
|
|
|
58
62
|
file: exports.globalFile,
|
|
59
63
|
params: [{
|
|
60
64
|
name: 'x',
|
|
61
|
-
type: new FloatType_1.FloatType()
|
|
65
|
+
type: new FloatType_1.FloatType(),
|
|
66
|
+
isOptional: false
|
|
62
67
|
}]
|
|
63
68
|
}, {
|
|
64
69
|
name: 'Csng',
|
|
@@ -67,7 +72,8 @@ let mathFunctions = [{
|
|
|
67
72
|
file: exports.globalFile,
|
|
68
73
|
params: [{
|
|
69
74
|
name: 'x',
|
|
70
|
-
type: new IntegerType_1.IntegerType()
|
|
75
|
+
type: new IntegerType_1.IntegerType(),
|
|
76
|
+
isOptional: false
|
|
71
77
|
}]
|
|
72
78
|
}, {
|
|
73
79
|
name: 'Exp',
|
|
@@ -76,7 +82,8 @@ let mathFunctions = [{
|
|
|
76
82
|
file: exports.globalFile,
|
|
77
83
|
params: [{
|
|
78
84
|
name: 'x',
|
|
79
|
-
type: new FloatType_1.FloatType()
|
|
85
|
+
type: new FloatType_1.FloatType(),
|
|
86
|
+
isOptional: false
|
|
80
87
|
}]
|
|
81
88
|
}, {
|
|
82
89
|
name: 'Fix',
|
|
@@ -85,7 +92,8 @@ let mathFunctions = [{
|
|
|
85
92
|
file: exports.globalFile,
|
|
86
93
|
params: [{
|
|
87
94
|
name: 'x',
|
|
88
|
-
type: new FloatType_1.FloatType()
|
|
95
|
+
type: new FloatType_1.FloatType(),
|
|
96
|
+
isOptional: false
|
|
89
97
|
}]
|
|
90
98
|
}, {
|
|
91
99
|
name: 'Int',
|
|
@@ -94,7 +102,8 @@ let mathFunctions = [{
|
|
|
94
102
|
file: exports.globalFile,
|
|
95
103
|
params: [{
|
|
96
104
|
name: 'x',
|
|
97
|
-
type: new FloatType_1.FloatType()
|
|
105
|
+
type: new FloatType_1.FloatType(),
|
|
106
|
+
isOptional: false
|
|
98
107
|
}]
|
|
99
108
|
}, {
|
|
100
109
|
name: 'Log',
|
|
@@ -103,7 +112,8 @@ let mathFunctions = [{
|
|
|
103
112
|
file: exports.globalFile,
|
|
104
113
|
params: [{
|
|
105
114
|
name: 'x',
|
|
106
|
-
type: new FloatType_1.FloatType()
|
|
115
|
+
type: new FloatType_1.FloatType(),
|
|
116
|
+
isOptional: false
|
|
107
117
|
}]
|
|
108
118
|
}, {
|
|
109
119
|
name: 'Rnd',
|
|
@@ -112,7 +122,8 @@ let mathFunctions = [{
|
|
|
112
122
|
file: exports.globalFile,
|
|
113
123
|
params: [{
|
|
114
124
|
name: 'range',
|
|
115
|
-
type: new IntegerType_1.IntegerType()
|
|
125
|
+
type: new IntegerType_1.IntegerType(),
|
|
126
|
+
isOptional: false
|
|
116
127
|
}]
|
|
117
128
|
}, {
|
|
118
129
|
name: 'Rnd',
|
|
@@ -121,7 +132,8 @@ let mathFunctions = [{
|
|
|
121
132
|
file: exports.globalFile,
|
|
122
133
|
params: [{
|
|
123
134
|
name: '0',
|
|
124
|
-
type: new IntegerType_1.IntegerType()
|
|
135
|
+
type: new IntegerType_1.IntegerType(),
|
|
136
|
+
isOptional: false
|
|
125
137
|
}]
|
|
126
138
|
}, {
|
|
127
139
|
name: 'Sgn',
|
|
@@ -130,7 +142,8 @@ let mathFunctions = [{
|
|
|
130
142
|
file: exports.globalFile,
|
|
131
143
|
params: [{
|
|
132
144
|
name: 'x',
|
|
133
|
-
type: new FloatType_1.FloatType()
|
|
145
|
+
type: new FloatType_1.FloatType(),
|
|
146
|
+
isOptional: false
|
|
134
147
|
}]
|
|
135
148
|
}, {
|
|
136
149
|
name: 'Sgn',
|
|
@@ -139,7 +152,8 @@ let mathFunctions = [{
|
|
|
139
152
|
file: exports.globalFile,
|
|
140
153
|
params: [{
|
|
141
154
|
name: 'x',
|
|
142
|
-
type: new IntegerType_1.IntegerType()
|
|
155
|
+
type: new IntegerType_1.IntegerType(),
|
|
156
|
+
isOptional: false
|
|
143
157
|
}]
|
|
144
158
|
}, {
|
|
145
159
|
name: 'Sin',
|
|
@@ -148,7 +162,8 @@ let mathFunctions = [{
|
|
|
148
162
|
file: exports.globalFile,
|
|
149
163
|
params: [{
|
|
150
164
|
name: 'x',
|
|
151
|
-
type: new FloatType_1.FloatType()
|
|
165
|
+
type: new FloatType_1.FloatType(),
|
|
166
|
+
isOptional: false
|
|
152
167
|
}]
|
|
153
168
|
}, {
|
|
154
169
|
name: 'Sqr',
|
|
@@ -157,7 +172,8 @@ let mathFunctions = [{
|
|
|
157
172
|
file: exports.globalFile,
|
|
158
173
|
params: [{
|
|
159
174
|
name: 'x',
|
|
160
|
-
type: new FloatType_1.FloatType()
|
|
175
|
+
type: new FloatType_1.FloatType(),
|
|
176
|
+
isOptional: false
|
|
161
177
|
}]
|
|
162
178
|
}, {
|
|
163
179
|
name: 'Tan',
|
|
@@ -166,7 +182,8 @@ let mathFunctions = [{
|
|
|
166
182
|
file: exports.globalFile,
|
|
167
183
|
params: [{
|
|
168
184
|
name: 'x',
|
|
169
|
-
type: new FloatType_1.FloatType()
|
|
185
|
+
type: new FloatType_1.FloatType(),
|
|
186
|
+
isOptional: false
|
|
170
187
|
}]
|
|
171
188
|
}];
|
|
172
189
|
let runtimeFunctions = [{
|
|
@@ -176,7 +193,8 @@ let runtimeFunctions = [{
|
|
|
176
193
|
file: exports.globalFile,
|
|
177
194
|
params: [{
|
|
178
195
|
name: 'name',
|
|
179
|
-
type: new StringType_1.StringType()
|
|
196
|
+
type: new StringType_1.StringType(),
|
|
197
|
+
isOptional: false
|
|
180
198
|
}, {
|
|
181
199
|
name: 'param2',
|
|
182
200
|
type: new DynamicType_1.DynamicType(),
|
|
@@ -189,15 +207,24 @@ let runtimeFunctions = [{
|
|
|
189
207
|
name: 'param4',
|
|
190
208
|
type: new DynamicType_1.DynamicType(),
|
|
191
209
|
isOptional: true
|
|
210
|
+
}, {
|
|
211
|
+
name: 'param5',
|
|
212
|
+
type: new DynamicType_1.DynamicType(),
|
|
213
|
+
isOptional: true
|
|
214
|
+
}, {
|
|
215
|
+
name: 'param6',
|
|
216
|
+
type: new DynamicType_1.DynamicType(),
|
|
217
|
+
isOptional: true
|
|
192
218
|
}]
|
|
193
219
|
}, {
|
|
194
220
|
name: 'Type',
|
|
195
221
|
shortDescription: 'Returns the type of a variable and/or object. See the BrightScript Component specification for a list of types.',
|
|
196
|
-
type: new FunctionType_1.FunctionType(new
|
|
222
|
+
type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
|
|
197
223
|
file: exports.globalFile,
|
|
198
224
|
params: [{
|
|
199
225
|
name: 'variable',
|
|
200
|
-
type: new ObjectType_1.ObjectType()
|
|
226
|
+
type: new ObjectType_1.ObjectType(),
|
|
227
|
+
isOptional: false
|
|
201
228
|
}, {
|
|
202
229
|
name: 'version',
|
|
203
230
|
type: new StringType_1.StringType(),
|
|
@@ -216,7 +243,8 @@ let runtimeFunctions = [{
|
|
|
216
243
|
file: exports.globalFile,
|
|
217
244
|
params: [{
|
|
218
245
|
name: 'x',
|
|
219
|
-
type: new DynamicType_1.DynamicType()
|
|
246
|
+
type: new DynamicType_1.DynamicType(),
|
|
247
|
+
isOptional: false
|
|
220
248
|
}]
|
|
221
249
|
}, {
|
|
222
250
|
name: 'Run',
|
|
@@ -225,11 +253,13 @@ let runtimeFunctions = [{
|
|
|
225
253
|
file: exports.globalFile,
|
|
226
254
|
params: [{
|
|
227
255
|
name: 'filename',
|
|
228
|
-
type: new StringType_1.StringType()
|
|
256
|
+
type: new StringType_1.StringType(),
|
|
257
|
+
isOptional: false
|
|
229
258
|
}, {
|
|
230
259
|
name: 'arg',
|
|
231
260
|
type: new DynamicType_1.DynamicType(),
|
|
232
|
-
isRestArgument: true
|
|
261
|
+
isRestArgument: true,
|
|
262
|
+
isOptional: false
|
|
233
263
|
}]
|
|
234
264
|
}, {
|
|
235
265
|
name: 'Run',
|
|
@@ -238,11 +268,13 @@ let runtimeFunctions = [{
|
|
|
238
268
|
file: exports.globalFile,
|
|
239
269
|
params: [{
|
|
240
270
|
name: 'filename',
|
|
241
|
-
type: new ArrayType_1.ArrayType(new StringType_1.StringType())
|
|
271
|
+
type: new ArrayType_1.ArrayType(new StringType_1.StringType()),
|
|
272
|
+
isOptional: false
|
|
242
273
|
}, {
|
|
243
274
|
name: 'arg',
|
|
244
275
|
type: new DynamicType_1.DynamicType(),
|
|
245
|
-
isRestArgument: true
|
|
276
|
+
isRestArgument: true,
|
|
277
|
+
isOptional: true
|
|
246
278
|
}]
|
|
247
279
|
}, {
|
|
248
280
|
name: 'Eval',
|
|
@@ -252,7 +284,8 @@ let runtimeFunctions = [{
|
|
|
252
284
|
isDeprecated: true,
|
|
253
285
|
params: [{
|
|
254
286
|
name: 'code',
|
|
255
|
-
type: new StringType_1.StringType()
|
|
287
|
+
type: new StringType_1.StringType(),
|
|
288
|
+
isOptional: false
|
|
256
289
|
}]
|
|
257
290
|
}, {
|
|
258
291
|
name: 'GetLastRunCompileError',
|
|
@@ -275,7 +308,8 @@ let globalUtilityFunctions = [
|
|
|
275
308
|
file: exports.globalFile,
|
|
276
309
|
params: [{
|
|
277
310
|
name: 'milliseconds',
|
|
278
|
-
type: new IntegerType_1.IntegerType()
|
|
311
|
+
type: new IntegerType_1.IntegerType(),
|
|
312
|
+
isOptional: false
|
|
279
313
|
}]
|
|
280
314
|
}, {
|
|
281
315
|
name: 'Wait',
|
|
@@ -284,10 +318,12 @@ let globalUtilityFunctions = [
|
|
|
284
318
|
file: exports.globalFile,
|
|
285
319
|
params: [{
|
|
286
320
|
name: 'timeout',
|
|
287
|
-
type: new IntegerType_1.IntegerType()
|
|
321
|
+
type: new IntegerType_1.IntegerType(),
|
|
322
|
+
isOptional: false
|
|
288
323
|
}, {
|
|
289
324
|
name: 'port',
|
|
290
|
-
type: new ObjectType_1.ObjectType()
|
|
325
|
+
type: new ObjectType_1.ObjectType(),
|
|
326
|
+
isOptional: false
|
|
291
327
|
}]
|
|
292
328
|
}, {
|
|
293
329
|
name: 'GetInterface',
|
|
@@ -296,10 +332,12 @@ let globalUtilityFunctions = [
|
|
|
296
332
|
file: exports.globalFile,
|
|
297
333
|
params: [{
|
|
298
334
|
name: 'object',
|
|
299
|
-
type: new ObjectType_1.ObjectType()
|
|
335
|
+
type: new ObjectType_1.ObjectType(),
|
|
336
|
+
isOptional: false
|
|
300
337
|
}, {
|
|
301
338
|
name: 'ifname',
|
|
302
|
-
type: new StringType_1.StringType()
|
|
339
|
+
type: new StringType_1.StringType(),
|
|
340
|
+
isOptional: false
|
|
303
341
|
}]
|
|
304
342
|
}, {
|
|
305
343
|
name: 'FindMemberFunction',
|
|
@@ -308,10 +346,12 @@ let globalUtilityFunctions = [
|
|
|
308
346
|
file: exports.globalFile,
|
|
309
347
|
params: [{
|
|
310
348
|
name: 'object',
|
|
311
|
-
type: new ObjectType_1.ObjectType()
|
|
349
|
+
type: new ObjectType_1.ObjectType(),
|
|
350
|
+
isOptional: false
|
|
312
351
|
}, {
|
|
313
352
|
name: 'functionName',
|
|
314
|
-
type: new StringType_1.StringType()
|
|
353
|
+
type: new StringType_1.StringType(),
|
|
354
|
+
isOptional: false
|
|
315
355
|
}]
|
|
316
356
|
}, {
|
|
317
357
|
name: 'UpTime',
|
|
@@ -320,7 +360,8 @@ let globalUtilityFunctions = [
|
|
|
320
360
|
file: exports.globalFile,
|
|
321
361
|
params: [{
|
|
322
362
|
name: 'dummy',
|
|
323
|
-
type: new IntegerType_1.IntegerType()
|
|
363
|
+
type: new IntegerType_1.IntegerType(),
|
|
364
|
+
isOptional: false
|
|
324
365
|
}]
|
|
325
366
|
}, {
|
|
326
367
|
name: 'RebootSystem',
|
|
@@ -335,7 +376,8 @@ let globalUtilityFunctions = [
|
|
|
335
376
|
file: exports.globalFile,
|
|
336
377
|
params: [{
|
|
337
378
|
name: 'path',
|
|
338
|
-
type: new StringType_1.StringType()
|
|
379
|
+
type: new StringType_1.StringType(),
|
|
380
|
+
isOptional: false
|
|
339
381
|
}]
|
|
340
382
|
}, {
|
|
341
383
|
name: 'ReadAsciiFile',
|
|
@@ -344,7 +386,8 @@ let globalUtilityFunctions = [
|
|
|
344
386
|
file: exports.globalFile,
|
|
345
387
|
params: [{
|
|
346
388
|
name: 'filePath',
|
|
347
|
-
type: new StringType_1.StringType()
|
|
389
|
+
type: new StringType_1.StringType(),
|
|
390
|
+
isOptional: false
|
|
348
391
|
}]
|
|
349
392
|
}, {
|
|
350
393
|
name: 'WriteAsciiFile',
|
|
@@ -353,10 +396,12 @@ let globalUtilityFunctions = [
|
|
|
353
396
|
file: exports.globalFile,
|
|
354
397
|
params: [{
|
|
355
398
|
name: 'filePath',
|
|
356
|
-
type: new StringType_1.StringType()
|
|
399
|
+
type: new StringType_1.StringType(),
|
|
400
|
+
isOptional: false
|
|
357
401
|
}, {
|
|
358
402
|
name: 'text',
|
|
359
|
-
type: new StringType_1.StringType()
|
|
403
|
+
type: new StringType_1.StringType(),
|
|
404
|
+
isOptional: false
|
|
360
405
|
}]
|
|
361
406
|
}, {
|
|
362
407
|
name: 'CopyFile',
|
|
@@ -365,10 +410,12 @@ let globalUtilityFunctions = [
|
|
|
365
410
|
file: exports.globalFile,
|
|
366
411
|
params: [{
|
|
367
412
|
name: 'source',
|
|
368
|
-
type: new StringType_1.StringType()
|
|
413
|
+
type: new StringType_1.StringType(),
|
|
414
|
+
isOptional: false
|
|
369
415
|
}, {
|
|
370
416
|
name: 'destination',
|
|
371
|
-
type: new StringType_1.StringType()
|
|
417
|
+
type: new StringType_1.StringType(),
|
|
418
|
+
isOptional: false
|
|
372
419
|
}]
|
|
373
420
|
}, {
|
|
374
421
|
name: 'MoveFile',
|
|
@@ -377,10 +424,12 @@ let globalUtilityFunctions = [
|
|
|
377
424
|
file: exports.globalFile,
|
|
378
425
|
params: [{
|
|
379
426
|
name: 'source',
|
|
380
|
-
type: new StringType_1.StringType()
|
|
427
|
+
type: new StringType_1.StringType(),
|
|
428
|
+
isOptional: false
|
|
381
429
|
}, {
|
|
382
430
|
name: 'destination',
|
|
383
|
-
type: new StringType_1.StringType()
|
|
431
|
+
type: new StringType_1.StringType(),
|
|
432
|
+
isOptional: false
|
|
384
433
|
}]
|
|
385
434
|
}, {
|
|
386
435
|
name: 'MatchFiles',
|
|
@@ -399,10 +448,12 @@ The characters '?', '*' and '[' lose their special meaning if preceded by a sing
|
|
|
399
448
|
file: exports.globalFile,
|
|
400
449
|
params: [{
|
|
401
450
|
name: 'path',
|
|
402
|
-
type: new StringType_1.StringType()
|
|
451
|
+
type: new StringType_1.StringType(),
|
|
452
|
+
isOptional: false
|
|
403
453
|
}, {
|
|
404
454
|
name: 'pattern_in',
|
|
405
|
-
type: new StringType_1.StringType()
|
|
455
|
+
type: new StringType_1.StringType(),
|
|
456
|
+
isOptional: false
|
|
406
457
|
}]
|
|
407
458
|
}, {
|
|
408
459
|
name: 'DeleteFile',
|
|
@@ -411,7 +462,8 @@ The characters '?', '*' and '[' lose their special meaning if preceded by a sing
|
|
|
411
462
|
file: exports.globalFile,
|
|
412
463
|
params: [{
|
|
413
464
|
name: 'file',
|
|
414
|
-
type: new StringType_1.StringType()
|
|
465
|
+
type: new StringType_1.StringType(),
|
|
466
|
+
isOptional: false
|
|
415
467
|
}]
|
|
416
468
|
}, {
|
|
417
469
|
name: 'DeleteDirectory',
|
|
@@ -420,7 +472,8 @@ The characters '?', '*' and '[' lose their special meaning if preceded by a sing
|
|
|
420
472
|
file: exports.globalFile,
|
|
421
473
|
params: [{
|
|
422
474
|
name: 'dir',
|
|
423
|
-
type: new StringType_1.StringType()
|
|
475
|
+
type: new StringType_1.StringType(),
|
|
476
|
+
isOptional: false
|
|
424
477
|
}]
|
|
425
478
|
}, {
|
|
426
479
|
name: 'CreateDirectory',
|
|
@@ -429,7 +482,8 @@ The characters '?', '*' and '[' lose their special meaning if preceded by a sing
|
|
|
429
482
|
file: exports.globalFile,
|
|
430
483
|
params: [{
|
|
431
484
|
name: 'dir',
|
|
432
|
-
type: new StringType_1.StringType()
|
|
485
|
+
type: new StringType_1.StringType(),
|
|
486
|
+
isOptional: false
|
|
433
487
|
}]
|
|
434
488
|
}, {
|
|
435
489
|
name: 'FormatDrive',
|
|
@@ -438,10 +492,12 @@ The characters '?', '*' and '[' lose their special meaning if preceded by a sing
|
|
|
438
492
|
file: exports.globalFile,
|
|
439
493
|
params: [{
|
|
440
494
|
name: 'drive',
|
|
441
|
-
type: new StringType_1.StringType()
|
|
495
|
+
type: new StringType_1.StringType(),
|
|
496
|
+
isOptional: false
|
|
442
497
|
}, {
|
|
443
498
|
name: 'fs_type',
|
|
444
|
-
type: new StringType_1.StringType()
|
|
499
|
+
type: new StringType_1.StringType(),
|
|
500
|
+
isOptional: false
|
|
445
501
|
}]
|
|
446
502
|
}, {
|
|
447
503
|
name: 'StrToI',
|
|
@@ -450,7 +506,8 @@ The characters '?', '*' and '[' lose their special meaning if preceded by a sing
|
|
|
450
506
|
file: exports.globalFile,
|
|
451
507
|
params: [{
|
|
452
508
|
name: 'str',
|
|
453
|
-
type: new StringType_1.StringType()
|
|
509
|
+
type: new StringType_1.StringType(),
|
|
510
|
+
isOptional: false
|
|
454
511
|
}]
|
|
455
512
|
}, {
|
|
456
513
|
name: 'RunGarbageCollector',
|
|
@@ -462,13 +519,20 @@ The characters '?', '*' and '[' lose their special meaning if preceded by a sing
|
|
|
462
519
|
name: 'ParseJson',
|
|
463
520
|
shortDescription: `This function will parse a string formatted according to RFC4627 and return an equivalent BrightScript object (consisting of booleans, integer and floating point numbers, strings, roArray, and roAssociativeArray objects). If the string is not syntactically correct, Invalid will be returned. A few other things to note:
|
|
464
521
|
|
|
465
|
-
Any roAssociativeArray objects in the returned objects will be case sensitive.
|
|
522
|
+
Any roAssociativeArray objects in the returned objects will be case sensitive. As of Roku OS 9.4, to return a case-insensitive structure, set the flags parameter to "i".
|
|
523
|
+
If the "i" option is used, and the jsonString includes multiple keys that match case-insensitively, duplicates are overwritten and only the last matching values are preserved.
|
|
466
524
|
An error will be returned if arrays/associative arrays are nested more than 256 levels deep.`,
|
|
467
525
|
type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
|
|
468
526
|
file: exports.globalFile,
|
|
469
527
|
params: [{
|
|
470
528
|
name: 'jsonString',
|
|
471
|
-
type: new StringType_1.StringType()
|
|
529
|
+
type: new StringType_1.StringType(),
|
|
530
|
+
isOptional: false
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
name: 'flags',
|
|
534
|
+
type: new StringType_1.StringType(),
|
|
535
|
+
isOptional: true
|
|
472
536
|
}]
|
|
473
537
|
}, {
|
|
474
538
|
name: 'FormatJson',
|
|
@@ -485,7 +549,8 @@ Normally non-ASCII characters are escaped in the output string as "\\uXXXX" wher
|
|
|
485
549
|
file: exports.globalFile,
|
|
486
550
|
params: [{
|
|
487
551
|
name: 'object',
|
|
488
|
-
type: new ObjectType_1.ObjectType()
|
|
552
|
+
type: new ObjectType_1.ObjectType(),
|
|
553
|
+
isOptional: false
|
|
489
554
|
}, {
|
|
490
555
|
name: 'flags',
|
|
491
556
|
type: new StringType_1.StringType(),
|
|
@@ -501,7 +566,8 @@ One way to accomplish that is to use the Replace method on the string value retu
|
|
|
501
566
|
file: exports.globalFile,
|
|
502
567
|
params: [{
|
|
503
568
|
name: 'source',
|
|
504
|
-
type: new StringType_1.StringType()
|
|
569
|
+
type: new StringType_1.StringType(),
|
|
570
|
+
isOptional: false
|
|
505
571
|
}]
|
|
506
572
|
}
|
|
507
573
|
];
|
|
@@ -513,7 +579,8 @@ let globalStringFunctions = [
|
|
|
513
579
|
file: exports.globalFile,
|
|
514
580
|
params: [{
|
|
515
581
|
name: 's',
|
|
516
|
-
type: new StringType_1.StringType()
|
|
582
|
+
type: new StringType_1.StringType(),
|
|
583
|
+
isOptional: false
|
|
517
584
|
}]
|
|
518
585
|
}, {
|
|
519
586
|
name: 'LCase',
|
|
@@ -522,7 +589,8 @@ let globalStringFunctions = [
|
|
|
522
589
|
file: exports.globalFile,
|
|
523
590
|
params: [{
|
|
524
591
|
name: 's',
|
|
525
|
-
type: new StringType_1.StringType()
|
|
592
|
+
type: new StringType_1.StringType(),
|
|
593
|
+
isOptional: false
|
|
526
594
|
}]
|
|
527
595
|
}, {
|
|
528
596
|
name: 'Asc',
|
|
@@ -531,7 +599,8 @@ let globalStringFunctions = [
|
|
|
531
599
|
file: exports.globalFile,
|
|
532
600
|
params: [{
|
|
533
601
|
name: 'letter',
|
|
534
|
-
type: new StringType_1.StringType()
|
|
602
|
+
type: new StringType_1.StringType(),
|
|
603
|
+
isOptional: false
|
|
535
604
|
}]
|
|
536
605
|
}, {
|
|
537
606
|
name: 'Chr',
|
|
@@ -546,7 +615,8 @@ By using Chr, you can create strings containing characters which cannot be conta
|
|
|
546
615
|
file: exports.globalFile,
|
|
547
616
|
params: [{
|
|
548
617
|
name: 'ch',
|
|
549
|
-
type: new IntegerType_1.IntegerType()
|
|
618
|
+
type: new IntegerType_1.IntegerType(),
|
|
619
|
+
isOptional: false
|
|
550
620
|
}]
|
|
551
621
|
}, {
|
|
552
622
|
name: 'Instr',
|
|
@@ -555,13 +625,16 @@ By using Chr, you can create strings containing characters which cannot be conta
|
|
|
555
625
|
file: exports.globalFile,
|
|
556
626
|
params: [{
|
|
557
627
|
name: 'start',
|
|
558
|
-
type: new IntegerType_1.IntegerType()
|
|
628
|
+
type: new IntegerType_1.IntegerType(),
|
|
629
|
+
isOptional: false
|
|
559
630
|
}, {
|
|
560
631
|
name: 'text',
|
|
561
|
-
type: new StringType_1.StringType()
|
|
632
|
+
type: new StringType_1.StringType(),
|
|
633
|
+
isOptional: false
|
|
562
634
|
}, {
|
|
563
635
|
name: 'substring',
|
|
564
|
-
type: new StringType_1.StringType()
|
|
636
|
+
type: new StringType_1.StringType(),
|
|
637
|
+
isOptional: false
|
|
565
638
|
}]
|
|
566
639
|
}, {
|
|
567
640
|
name: 'Left',
|
|
@@ -570,10 +643,12 @@ By using Chr, you can create strings containing characters which cannot be conta
|
|
|
570
643
|
file: exports.globalFile,
|
|
571
644
|
params: [{
|
|
572
645
|
name: 's',
|
|
573
|
-
type: new StringType_1.StringType()
|
|
646
|
+
type: new StringType_1.StringType(),
|
|
647
|
+
isOptional: false
|
|
574
648
|
}, {
|
|
575
649
|
name: 'n',
|
|
576
|
-
type: new IntegerType_1.IntegerType()
|
|
650
|
+
type: new IntegerType_1.IntegerType(),
|
|
651
|
+
isOptional: false
|
|
577
652
|
}]
|
|
578
653
|
}, {
|
|
579
654
|
name: 'Len',
|
|
@@ -582,7 +657,8 @@ By using Chr, you can create strings containing characters which cannot be conta
|
|
|
582
657
|
file: exports.globalFile,
|
|
583
658
|
params: [{
|
|
584
659
|
name: 's',
|
|
585
|
-
type: new StringType_1.StringType()
|
|
660
|
+
type: new StringType_1.StringType(),
|
|
661
|
+
isOptional: false
|
|
586
662
|
}]
|
|
587
663
|
}, {
|
|
588
664
|
name: 'Mid',
|
|
@@ -591,10 +667,12 @@ By using Chr, you can create strings containing characters which cannot be conta
|
|
|
591
667
|
file: exports.globalFile,
|
|
592
668
|
params: [{
|
|
593
669
|
name: 's',
|
|
594
|
-
type: new StringType_1.StringType()
|
|
670
|
+
type: new StringType_1.StringType(),
|
|
671
|
+
isOptional: false
|
|
595
672
|
}, {
|
|
596
673
|
name: 'p',
|
|
597
|
-
description: '1-based position',
|
|
674
|
+
//description: '1-based position',
|
|
675
|
+
isOptional: false,
|
|
598
676
|
type: new IntegerType_1.IntegerType()
|
|
599
677
|
}, {
|
|
600
678
|
name: 'n',
|
|
@@ -608,10 +686,12 @@ By using Chr, you can create strings containing characters which cannot be conta
|
|
|
608
686
|
file: exports.globalFile,
|
|
609
687
|
params: [{
|
|
610
688
|
name: 's',
|
|
611
|
-
type: new StringType_1.StringType()
|
|
689
|
+
type: new StringType_1.StringType(),
|
|
690
|
+
isOptional: false
|
|
612
691
|
}, {
|
|
613
692
|
name: 'n',
|
|
614
|
-
type: new IntegerType_1.IntegerType()
|
|
693
|
+
type: new IntegerType_1.IntegerType(),
|
|
694
|
+
isOptional: false
|
|
615
695
|
}]
|
|
616
696
|
}, {
|
|
617
697
|
name: 'Str',
|
|
@@ -620,19 +700,22 @@ By using Chr, you can create strings containing characters which cannot be conta
|
|
|
620
700
|
file: exports.globalFile,
|
|
621
701
|
params: [{
|
|
622
702
|
name: 'value',
|
|
623
|
-
type: new FloatType_1.FloatType()
|
|
703
|
+
type: new FloatType_1.FloatType(),
|
|
704
|
+
isOptional: false
|
|
624
705
|
}]
|
|
625
706
|
}, {
|
|
626
707
|
name: 'StrI',
|
|
627
|
-
shortDescription: 'Converts a value to a string. Str(A), for example, returns a string equal to the decimal representation of the numeric value of A.\nNote: for non-negative numbers, a leading blank is inserted before the value string as a sign placeholder
|
|
708
|
+
shortDescription: 'Converts a value to a string. Str(A), for example, returns a string equal to the decimal representation of the numeric value of A.\nNote: for non-negative numbers, a leading blank is inserted before the value string as a sign placeholder. If the radix parameter is provided, then converts the integer value into a string representation using the given radix.\nIf radix is not 2 .. 36 then an empty string is returned.\nNote that the returned string does not include a base prefix and uses lowercase letters to represent those digits in bases greater than 10.',
|
|
628
709
|
type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
|
|
629
710
|
file: exports.globalFile,
|
|
630
711
|
params: [{
|
|
631
712
|
name: 'value',
|
|
632
|
-
type: new IntegerType_1.IntegerType()
|
|
713
|
+
type: new IntegerType_1.IntegerType(),
|
|
714
|
+
isOptional: false
|
|
633
715
|
}, {
|
|
634
716
|
name: 'radix',
|
|
635
|
-
type: new IntegerType_1.IntegerType()
|
|
717
|
+
type: new IntegerType_1.IntegerType(),
|
|
718
|
+
isOptional: true
|
|
636
719
|
}]
|
|
637
720
|
}, {
|
|
638
721
|
name: 'string',
|
|
@@ -641,10 +724,12 @@ By using Chr, you can create strings containing characters which cannot be conta
|
|
|
641
724
|
file: exports.globalFile,
|
|
642
725
|
params: [{
|
|
643
726
|
name: 'n',
|
|
644
|
-
type: new IntegerType_1.IntegerType()
|
|
727
|
+
type: new IntegerType_1.IntegerType(),
|
|
728
|
+
isOptional: false
|
|
645
729
|
}, {
|
|
646
730
|
name: 'str',
|
|
647
|
-
type: new StringType_1.StringType()
|
|
731
|
+
type: new StringType_1.StringType(),
|
|
732
|
+
isOptional: false
|
|
648
733
|
}]
|
|
649
734
|
}, {
|
|
650
735
|
name: 'StringI',
|
|
@@ -653,22 +738,36 @@ By using Chr, you can create strings containing characters which cannot be conta
|
|
|
653
738
|
file: exports.globalFile,
|
|
654
739
|
params: [{
|
|
655
740
|
name: 'n',
|
|
656
|
-
type: new IntegerType_1.IntegerType()
|
|
741
|
+
type: new IntegerType_1.IntegerType(),
|
|
742
|
+
isOptional: false
|
|
657
743
|
}, {
|
|
658
744
|
name: 'ch',
|
|
659
|
-
type: new IntegerType_1.IntegerType()
|
|
745
|
+
type: new IntegerType_1.IntegerType(),
|
|
746
|
+
isOptional: false
|
|
660
747
|
}]
|
|
661
748
|
}, {
|
|
662
749
|
name: 'Val',
|
|
663
|
-
shortDescription: 'Performs the inverse of the STR function: returns the number represented by the characters in a string argument.\nFor example, if A$="12" and B$="34" then VAL(A$+ "."+B$) returns the number 12.34.
|
|
750
|
+
shortDescription: 'Performs the inverse of the STR function: returns the number represented by the characters in a string argument.\nFor example, if A$="12" and B$="34" then VAL(A$+ "."+B$) returns the number 12.34.',
|
|
751
|
+
type: new FunctionType_1.FunctionType(new FloatType_1.FloatType()),
|
|
752
|
+
file: exports.globalFile,
|
|
753
|
+
params: [{
|
|
754
|
+
name: 'str',
|
|
755
|
+
type: new StringType_1.StringType(),
|
|
756
|
+
isOptional: false
|
|
757
|
+
}]
|
|
758
|
+
}, {
|
|
759
|
+
name: 'Val',
|
|
760
|
+
shortDescription: 'Returns the integer value from parsing the string with the specified radix.\nRadix should be 2 .. 36 or the special value 0 (which automatically identified hexadecimal or octal numbers based on 0x or 0 prefixes respectively).\nLeading whitespace is ignored then as much of the rest of the string will be parsed as valid.',
|
|
664
761
|
type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
|
|
665
762
|
file: exports.globalFile,
|
|
666
763
|
params: [{
|
|
667
764
|
name: 'str',
|
|
668
|
-
type: new StringType_1.StringType()
|
|
765
|
+
type: new StringType_1.StringType(),
|
|
766
|
+
isOptional: false
|
|
669
767
|
}, {
|
|
670
768
|
name: 'radix',
|
|
671
|
-
type: new IntegerType_1.IntegerType()
|
|
769
|
+
type: new IntegerType_1.IntegerType(),
|
|
770
|
+
isOptional: true
|
|
672
771
|
}]
|
|
673
772
|
}, {
|
|
674
773
|
name: 'Substitute',
|
|
@@ -677,19 +776,24 @@ By using Chr, you can create strings containing characters which cannot be conta
|
|
|
677
776
|
file: exports.globalFile,
|
|
678
777
|
params: [{
|
|
679
778
|
name: 'str',
|
|
680
|
-
type: new StringType_1.StringType()
|
|
779
|
+
type: new StringType_1.StringType(),
|
|
780
|
+
isOptional: false
|
|
681
781
|
}, {
|
|
682
782
|
name: 'arg0',
|
|
683
|
-
type: new StringType_1.StringType()
|
|
783
|
+
type: new StringType_1.StringType(),
|
|
784
|
+
isOptional: false
|
|
684
785
|
}, {
|
|
685
786
|
name: 'arg1',
|
|
686
|
-
type: new StringType_1.StringType()
|
|
787
|
+
type: new StringType_1.StringType(),
|
|
788
|
+
isOptional: true
|
|
687
789
|
}, {
|
|
688
790
|
name: 'arg2',
|
|
689
|
-
type: new StringType_1.StringType()
|
|
791
|
+
type: new StringType_1.StringType(),
|
|
792
|
+
isOptional: true
|
|
690
793
|
}, {
|
|
691
794
|
name: 'arg3',
|
|
692
|
-
type: new StringType_1.StringType()
|
|
795
|
+
type: new StringType_1.StringType(),
|
|
796
|
+
isOptional: true
|
|
693
797
|
}]
|
|
694
798
|
}
|
|
695
799
|
];
|
|
@@ -701,7 +805,8 @@ let programStatementFunctions = [
|
|
|
701
805
|
file: exports.globalFile,
|
|
702
806
|
params: [{
|
|
703
807
|
name: 'expression',
|
|
704
|
-
type: new IntegerType_1.IntegerType()
|
|
808
|
+
type: new IntegerType_1.IntegerType(),
|
|
809
|
+
isOptional: false
|
|
705
810
|
}]
|
|
706
811
|
}, {
|
|
707
812
|
name: 'Pos',
|
|
@@ -710,7 +815,8 @@ let programStatementFunctions = [
|
|
|
710
815
|
file: exports.globalFile,
|
|
711
816
|
params: [{
|
|
712
817
|
name: 'x',
|
|
713
|
-
type: new IntegerType_1.IntegerType()
|
|
818
|
+
type: new IntegerType_1.IntegerType(),
|
|
819
|
+
isOptional: false
|
|
714
820
|
}]
|
|
715
821
|
//TODO this is a temporary fix for library imported files. Eventually this should be moved into `Roku_Ads.brs` and handled by the `Library` statement
|
|
716
822
|
}, {
|
|
@@ -719,6 +825,172 @@ let programStatementFunctions = [
|
|
|
719
825
|
type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
|
|
720
826
|
file: exports.globalFile,
|
|
721
827
|
params: []
|
|
828
|
+
}, {
|
|
829
|
+
name: 'bslBrightScriptErrorCodes',
|
|
830
|
+
shortDescription: 'Returns an roAssociativeArray with name value pairs of the error name and corresponding integer value, for example ERR_OKAY = &hFF.',
|
|
831
|
+
type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
|
|
832
|
+
file: exports.globalFile,
|
|
833
|
+
params: []
|
|
834
|
+
}, {
|
|
835
|
+
name: 'bslGeneralConstants',
|
|
836
|
+
shortDescription: 'Returns an roAssociativeArray with name value pairs of system constants, for example MAX_INT = 2147483647.',
|
|
837
|
+
type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
|
|
838
|
+
file: exports.globalFile,
|
|
839
|
+
params: []
|
|
840
|
+
}, {
|
|
841
|
+
name: 'bslUniversalControlEventCodes',
|
|
842
|
+
shortDescription: 'Returns an roAssociativeArray with name value pairs of the remote key code (buttons) constants, for example BUTTON_SELECT_PRESSED = 6.',
|
|
843
|
+
type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
|
|
844
|
+
file: exports.globalFile,
|
|
845
|
+
params: []
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
name: 'AsciiToHex',
|
|
849
|
+
shortDescription: 'Returns the hex encoded string, for example AsciiToHex("Hi!") = "486921".',
|
|
850
|
+
type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
|
|
851
|
+
file: exports.globalFile,
|
|
852
|
+
params: [{
|
|
853
|
+
name: 'ascii',
|
|
854
|
+
type: new StringType_1.StringType(),
|
|
855
|
+
isOptional: false
|
|
856
|
+
}]
|
|
857
|
+
}, {
|
|
858
|
+
name: 'HexToAscii',
|
|
859
|
+
shortDescription: 'Returns a string that is the hex decoded string, for example HexToAscii("486921") = "Hi!".',
|
|
860
|
+
type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
|
|
861
|
+
file: exports.globalFile,
|
|
862
|
+
params: [{
|
|
863
|
+
name: 'hex',
|
|
864
|
+
type: new StringType_1.StringType(),
|
|
865
|
+
isOptional: false
|
|
866
|
+
}]
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
name: 'HexToInteger',
|
|
870
|
+
shortDescription: 'Returns the integer value of the passed in hex string.',
|
|
871
|
+
type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
|
|
872
|
+
file: exports.globalFile,
|
|
873
|
+
params: [{
|
|
874
|
+
name: 'hex',
|
|
875
|
+
type: new StringType_1.StringType(),
|
|
876
|
+
isOptional: false
|
|
877
|
+
}]
|
|
878
|
+
}, {
|
|
879
|
+
name: 'HexToInteger',
|
|
880
|
+
shortDescription: 'Returns a string that is the hex decoded string, for example HexToAscii("486921") = "Hi!".',
|
|
881
|
+
type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
|
|
882
|
+
file: exports.globalFile,
|
|
883
|
+
params: [{
|
|
884
|
+
name: 'hex',
|
|
885
|
+
type: new StringType_1.StringType(),
|
|
886
|
+
isOptional: false
|
|
887
|
+
}]
|
|
888
|
+
}, {
|
|
889
|
+
name: 'dfNewBitmapSet',
|
|
890
|
+
shortDescription: `The goal is to enable simple xml descriptions of graphics resources like bitmaps, regions, sprites, animations, and layouts to be used in your games. The library handles parsing, loading, rendering, and animation of sprites sheets (multiple images in a single png file).
|
|
891
|
+
Filename is the path to an XML file that contains info about bitmap regions, animation frames, and ExtraInfo metadata (any fields you would like) about resources used in 2d games.
|
|
892
|
+
Returns an roAssociativeArray with the following name value pairs:
|
|
893
|
+
ExtraInfo: roAssociativeArray
|
|
894
|
+
Regions: roAssociativeArray of name, roRegions pairs
|
|
895
|
+
Animations: roAssociativeArray of name, roArray of roRegion pairs.
|
|
896
|
+
Backgrounds: roAssociativeArray of name, path pairs.`,
|
|
897
|
+
type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
|
|
898
|
+
file: exports.globalFile,
|
|
899
|
+
params: [{
|
|
900
|
+
name: 'filename',
|
|
901
|
+
type: new StringType_1.StringType(),
|
|
902
|
+
isOptional: false
|
|
903
|
+
}]
|
|
904
|
+
}, {
|
|
905
|
+
name: 'dfDrawMessage',
|
|
906
|
+
shortDescription: 'dest is an roScreen/roBitmap/roRegion and region is an roRegion.\nGreys the entire dest region and draws it the region centered on the drawable dest.',
|
|
907
|
+
type: new FunctionType_1.FunctionType(new VoidType_1.VoidType()),
|
|
908
|
+
file: exports.globalFile,
|
|
909
|
+
params: [{
|
|
910
|
+
name: 'dest',
|
|
911
|
+
type: new ObjectType_1.ObjectType(),
|
|
912
|
+
isOptional: false
|
|
913
|
+
}, {
|
|
914
|
+
name: 'region',
|
|
915
|
+
type: new ObjectType_1.ObjectType(),
|
|
916
|
+
isOptional: false
|
|
917
|
+
}]
|
|
918
|
+
}, {
|
|
919
|
+
name: 'dfDrawImage',
|
|
920
|
+
shortDescription: 'Returns True if successful.\nCreates a bitmap out of the image stored in the filename "path" and draws it at position (x,y) of the drawable dest.',
|
|
921
|
+
type: new FunctionType_1.FunctionType(new BooleanType_1.BooleanType()),
|
|
922
|
+
file: exports.globalFile,
|
|
923
|
+
params: [{
|
|
924
|
+
name: 'dest',
|
|
925
|
+
type: new ObjectType_1.ObjectType(),
|
|
926
|
+
isOptional: false
|
|
927
|
+
}, {
|
|
928
|
+
name: 'path',
|
|
929
|
+
type: new StringType_1.StringType(),
|
|
930
|
+
isOptional: false
|
|
931
|
+
}, {
|
|
932
|
+
name: 'x',
|
|
933
|
+
type: new IntegerType_1.IntegerType(),
|
|
934
|
+
isOptional: false
|
|
935
|
+
}, {
|
|
936
|
+
name: 'y',
|
|
937
|
+
type: new IntegerType_1.IntegerType(),
|
|
938
|
+
isOptional: false
|
|
939
|
+
}]
|
|
940
|
+
}, {
|
|
941
|
+
name: 'dfSetupDisplayRegions',
|
|
942
|
+
shortDescription: `Helper function to setup screen scaling with supplied pillar box or letterbox images to fill the entire screen.
|
|
943
|
+
screen is an roScreen
|
|
944
|
+
topx and topy are the coordinates of the upper left hand corner of the main drawing region
|
|
945
|
+
Width and height is the size of the main drawing region
|
|
946
|
+
|
|
947
|
+
Returns an associative array containing the following roRegions
|
|
948
|
+
Main: main drawable region
|
|
949
|
+
Left: left region if there is pillar box area on the left
|
|
950
|
+
Right: right region if there is a pillar box area on the right
|
|
951
|
+
Upper: upper region if there is a letterbox area at thetop
|
|
952
|
+
Lower: lower region if there is a letterbox area at the bottom
|
|
953
|
+
When using these regions as drawables, your graphics will be translated and clipped to these regions.`,
|
|
954
|
+
type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
|
|
955
|
+
file: exports.globalFile,
|
|
956
|
+
params: [{
|
|
957
|
+
name: 'screen',
|
|
958
|
+
type: new ObjectType_1.ObjectType(),
|
|
959
|
+
isOptional: false
|
|
960
|
+
}, {
|
|
961
|
+
name: 'topx',
|
|
962
|
+
type: new IntegerType_1.IntegerType(),
|
|
963
|
+
isOptional: false
|
|
964
|
+
}, {
|
|
965
|
+
name: 'topy',
|
|
966
|
+
type: new IntegerType_1.IntegerType(),
|
|
967
|
+
isOptional: false
|
|
968
|
+
}, {
|
|
969
|
+
name: 'width',
|
|
970
|
+
type: new IntegerType_1.IntegerType(),
|
|
971
|
+
isOptional: false
|
|
972
|
+
}, {
|
|
973
|
+
name: 'height',
|
|
974
|
+
type: new IntegerType_1.IntegerType(),
|
|
975
|
+
isOptional: false
|
|
976
|
+
}]
|
|
977
|
+
}, {
|
|
978
|
+
name: 'dfSetBackground',
|
|
979
|
+
shortDescription: `dfSetBackground helps manage the limited video memory. The video memory does not currently run a defragmenter, and is very limited. These constraints make it important that large bitmaps (like backgrounds that fill the entire screen) are only allocated when needed. It is also helpful if you set your first initial background very early in your program, and then immediately replace the background after it is no longer in use. This helper function supports this background management for your application.
|
|
980
|
+
backgroundName is a key for the Backgrounds roAssociative array of backgrounds.
|
|
981
|
+
Backgrounds is an roAssociative array of background name keys and file path string values
|
|
982
|
+
This function creates an roBitmap out of the background image file and returns a region the size of the entire roBitmap.`,
|
|
983
|
+
type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
|
|
984
|
+
file: exports.globalFile,
|
|
985
|
+
params: [{
|
|
986
|
+
name: 'backgroundName',
|
|
987
|
+
type: new StringType_1.StringType(),
|
|
988
|
+
isOptional: false
|
|
989
|
+
}, {
|
|
990
|
+
name: 'backgrounds',
|
|
991
|
+
type: new ObjectType_1.ObjectType(),
|
|
992
|
+
isOptional: false
|
|
993
|
+
}]
|
|
722
994
|
}
|
|
723
995
|
];
|
|
724
996
|
exports.globalCallables = [...mathFunctions, ...runtimeFunctions, ...globalUtilityFunctions, ...globalStringFunctions, ...programStatementFunctions];
|
|
@@ -727,7 +999,7 @@ for (let callable of exports.globalCallables) {
|
|
|
727
999
|
callable.nameRange = util_1.default.createRange(0, 0, 0, callable.name.length);
|
|
728
1000
|
//add each parameter to the type
|
|
729
1001
|
for (let param of callable.params) {
|
|
730
|
-
callable.type.addParameter(param
|
|
1002
|
+
callable.type.addParameter(param);
|
|
731
1003
|
}
|
|
732
1004
|
//set name in type
|
|
733
1005
|
callable.type.setName(callable.name);
|