Compare commits

...

3 Commits

Author SHA1 Message Date
c6bed88d37
Add test for basic custom struct 2023-08-28 22:15:10 +08:00
3640da1cf2
format main.cpp 2023-08-28 22:11:02 +08:00
3148127319
update code format configure 2023-08-28 21:58:23 +08:00
3 changed files with 870 additions and 846 deletions

View File

@ -1,5 +1,5 @@
Language: Cpp
AccessModifierOffset: -4
AccessModifierOffset: -8
AlignAfterOpenBracket: Align
AlignArrayOfStructures: Left
AlignConsecutiveMacros: None
@ -56,8 +56,8 @@ BreakStringLiterals: true
ColumnLimit: 99
QualifierAlignment: Left
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
@ -79,7 +79,7 @@ IndentGotoLabels: false
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequires: false
IndentWidth: 4
IndentWidth: 8
IndentWrappedFunctionNames: false
InsertTrailingCommas: Wrapped
InsertBraces: true
@ -141,7 +141,7 @@ SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: Cpp11
TabWidth: 4
TabWidth: 8
UseCRLF: false
UseTab: Always

File diff suppressed because it is too large Load Diff

16
tests/ok/custom-struct.ac Normal file
View File

@ -0,0 +1,16 @@
struct {
struct And<P, Q>(p: P, q: Q) {
left = Fn<>() -> P {
return p;
};
right = Fn<>() -> Q {
return q;
};
};
AndLeft = Fn<P, Q>(h: And<P, Q>) -> P {
return h.p;
};
} main;