-
- Downloads
You need to sign in or sign up before continuing.
Add tuple expressions for vector initialization
This allows to write `` let f : R -> R^3, x -> (x, 2*x+1, -2); R^3 x = f(2.3); `` or even `` let f : R -> R^3*R, x -> ((x, 2*x+1, -2), x-1); R^3*R (x,t) = f(2.3); `` Note that it is not completely functional since `` let f : R -> R^3, x -> (x, 2*x+1, -2); R^3 x = 2*f(2.3); `` does not work! The return type of `f(2.3)` is incorrect (should be an R^3 but remains a `typename` which is improper for these calculations).
Showing
- src/language/ASTBuilder.cpp 1 addition, 0 deletionssrc/language/ASTBuilder.cpp
- src/language/ASTNodeDataTypeBuilder.cpp 36 additions, 13 deletionssrc/language/ASTNodeDataTypeBuilder.cpp
- src/language/ASTNodeExpressionBuilder.cpp 19 additions, 0 deletionssrc/language/ASTNodeExpressionBuilder.cpp
- src/language/ASTNodeFunctionExpressionBuilder.cpp 11 additions, 4 deletionssrc/language/ASTNodeFunctionExpressionBuilder.cpp
- src/language/PEGGrammar.hpp 3 additions, 1 deletionsrc/language/PEGGrammar.hpp
- src/language/node_processor/TupleToVectorProcessor.hpp 45 additions, 0 deletionssrc/language/node_processor/TupleToVectorProcessor.hpp
Loading
Please register or sign in to comment