-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, Stereocode does not correctly recognize a struct or a class that uses the primary constructor syntax. The constructor logic is defined directly in the type declaration line rather than a traditional method body.
Example:
public struct RECT(int left, int top)
{
public int Left = left;
public int Top = top;
}Is the same as:
public struct RECT
{
public int Left;
public int Top;
public RECT(int left, int top,)
{
Left = left;
Top = top;
}
}srcML
<function><type><specifier>public</specifier> <name><name>struct</name> <name>RECT</name></name></type>(<name>int</name> <name>left</name>, <name>int</name> <name>top</name></function>)
<block>{<block_content>
<decl_stmt><decl><type><specifier>public</specifier> <name>int</name></type> <name>Left</name> <init>= <expr><name>left</name></expr></init></decl>;</decl_stmt>
<decl_stmt><decl><type><specifier>public</specifier> <name>int</name></type> <name>Top</name> <init>= <expr><name>top</name></expr></init></decl>;</decl_stmt>
</block_content>}</block>Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request