Skip to content

Commit 6b86bde

Browse files
committed
POC #972 FullDefiniton, Save print out attributes list
1 parent 754b578 commit 6b86bde

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/Symbol.java

+5
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,11 @@ public IAST fullDefinition() {
286286
Iterator<ISymbol> iterator = symbolSet.iterator();
287287
while (iterator.hasNext()) {
288288
ISymbol symbol = iterator.next();
289+
290+
IAST attributesList = AttributeFunctions.attributesList(symbol);
291+
if (attributesList.size() > 1) {
292+
fullDefinition.append(F.Set(F.Attributes(symbol), attributesList));
293+
}
289294
IAST subRules = symbol.definition();
290295
fullDefinition.appendArgs(subRules);
291296
}

symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/FileFunctionsTest.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,18 @@ public void testSave() {
1616
"");
1717
check("Save(temp, f)", //
1818
"");
19-
check("Clear(f,g)", //
19+
check("ClearAll(f,g)", //
2020
"");
21+
check("Attributes(f)", //
22+
"{}");
2123
check("{f(2),g(7)}", //
2224
"{f(2),g(7)}");
2325
check("Get(temp)", //
2426
"");
2527
check("{f(2),g(7)}", //
2628
"{64,343}");
29+
check("Attributes(f)", //
30+
"{Listable}");
2731
}
2832

2933

0 commit comments

Comments
 (0)