Daily update on 20250323-151439 by Nitload Youmu. Additional Message : none

Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
Nitload
2025-03-23 15:14:39 +08:00
parent 528d0c5462
commit 148b0fed4a
29 changed files with 313 additions and 178 deletions
@@ -68,7 +68,8 @@ namespace StgSharp.Script.Express
0;
return new ExpBinaryOperatorNode( source )
{
_returnType = isFloat ? ExpCompile.ExpReal : ExpCompile.ExpInt,
_returnType = isFloat ?
ExpressCompile.ExpReal : ExpressCompile.ExpInt,
_nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number,
CodeConvertTemplate = "{0} + {1}",
};
@@ -106,7 +107,8 @@ namespace StgSharp.Script.Express
0;
return new ExpBinaryOperatorNode( source )
{
_returnType = isFloat ? ExpCompile.ExpReal : ExpCompile.ExpInt,
_returnType = isFloat ?
ExpressCompile.ExpReal : ExpressCompile.ExpInt,
_nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number,
CodeConvertTemplate = "{0} / {1}",
};
@@ -124,7 +126,7 @@ namespace StgSharp.Script.Express
}
return new ExpBinaryOperatorNode( source )
{
_returnType = ExpCompile.ExpBool,
_returnType = ExpressCompile.ExpBool,
_nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary,
CodeConvertTemplate = "{0} == {1}",
};
@@ -141,7 +143,7 @@ namespace StgSharp.Script.Express
}
return new ExpBinaryOperatorNode( source )
{
_returnType = ExpCompile.ExpBool,
_returnType = ExpressCompile.ExpBool,
_nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary,
CodeConvertTemplate = "{0} > {1}",
};
@@ -158,7 +160,7 @@ namespace StgSharp.Script.Express
}
return new ExpBinaryOperatorNode( source )
{
_returnType = ExpCompile.ExpBool,
_returnType = ExpressCompile.ExpBool,
_nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary,
CodeConvertTemplate = "{0} < {1}",
};
@@ -178,7 +180,8 @@ namespace StgSharp.Script.Express
0;
return new ExpBinaryOperatorNode( source )
{
_returnType = isFloat ? ExpCompile.ExpReal : ExpCompile.ExpInt,
_returnType = isFloat ?
ExpressCompile.ExpReal : ExpressCompile.ExpInt,
_nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number,
CodeConvertTemplate = "{0} * {1}",
};
@@ -196,7 +199,7 @@ namespace StgSharp.Script.Express
}
return new ExpBinaryOperatorNode( source )
{
_returnType = ExpCompile.ExpBool,
_returnType = ExpressCompile.ExpBool,
_nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary,
CodeConvertTemplate = "{0} != {1}",
};
@@ -213,7 +216,7 @@ namespace StgSharp.Script.Express
}
return new ExpBinaryOperatorNode( source )
{
_returnType = ExpCompile.ExpBool,
_returnType = ExpressCompile.ExpBool,
_nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary,
CodeConvertTemplate = "{0} < {1}",
};
@@ -233,7 +236,8 @@ namespace StgSharp.Script.Express
0;
return new ExpBinaryOperatorNode( source )
{
_returnType = isFloat ? ExpCompile.ExpReal : ExpCompile.ExpInt,
_returnType = isFloat ?
ExpressCompile.ExpReal : ExpressCompile.ExpInt,
_nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number,
CodeConvertTemplate = "{0} - {1}",
};
@@ -56,7 +56,7 @@ namespace StgSharp.Script.Express
{
ExpSchema.BuiltinSchema
.TryGetType(
ExpCompile.KeyWord.String,
ExpressCompile.KeyWord.String,
out ExpTypeSource? strType );
return strType;
}
@@ -51,13 +51,13 @@ namespace StgSharp.Script.Express
public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema
.TryGetType(
ExpCompile.KeyWord.Integer,
ExpressCompile.KeyWord.Integer,
out ExpTypeSource? type ) ?
type : throw new ExpCompileNotInitializedException();
public int Value => _value;
public override string TypeName => ExpCompile.KeyWord.Integer;
public override string TypeName => ExpressCompile.KeyWord.Integer;
}
@@ -75,7 +75,7 @@ namespace StgSharp.Script.Express
public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema
.TryGetType(
ExpCompile.KeyWord.String,
ExpressCompile.KeyWord.String,
out ExpTypeSource? type ) ?
type : throw new ExpCompileNotInitializedException();
@@ -101,7 +101,7 @@ namespace StgSharp.Script.Express
public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema
.TryGetType(
ExpCompile.KeyWord.Boolean,
ExpressCompile.KeyWord.Boolean,
out ExpTypeSource? type ) ?
type : throw new ExpCompileNotInitializedException();
@@ -125,7 +125,7 @@ namespace StgSharp.Script.Express
public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema
.TryGetType(
ExpCompile.KeyWord.String,
ExpressCompile.KeyWord.String,
out ExpTypeSource? type ) ?
type : throw new ExpCompileNotInitializedException();
@@ -149,7 +149,7 @@ namespace StgSharp.Script.Express
public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema
.TryGetType(
ExpCompile.KeyWord.Logical,
ExpressCompile.KeyWord.Logical,
out ExpTypeSource? type ) ?
type : throw new ExpCompileNotInitializedException();
@@ -36,7 +36,7 @@ using System.Text;
namespace StgSharp.Script.Express
{
public class ExpRepeatToken : ExpNode
public class ExpRepeatNode : ExpNode
{
//TODO: Current code cannot represent full functionality defined in ISO10303, need rewrite.
@@ -45,7 +45,7 @@ namespace StgSharp.Script.Express
private ExpNode _operationBegin;
public ExpRepeatToken(
public ExpRepeatNode(
Token source,
ExpNode operationBegin,
ExpElementInstanceBase variable,
@@ -64,14 +64,14 @@ namespace StgSharp.Script.Express
case ExpNodeFlag.BuiltinType_Real:
increment = new ExpRealNumberNode(
new Token(
ExpCompile.PoolString( "1.0f" ), source.Line,
ExpressCompile.PoolString( "1.0f" ), source.Line,
-1, TokenFlag.Number ),
1.0f );
break;
case ExpNodeFlag.BuiltinType_Int:
increment = new ExpIntNode(
new Token(
ExpCompile.PoolString( "1" ), source.Line, -1,
ExpressCompile.PoolString( "1" ), source.Line, -1,
TokenFlag.Number ),
1 );
break;