Skip to content

Support collection of expression-bodied (lambda) methods in C# #76

@aalramadan

Description

@aalramadan

Stereocode currently does not support the collection of methods defined using expression-bodied (lambda) syntax. Similar to the issue with read-only properties, these methods are often parsed by srcML as expression statements <expr_stmt> rather than <function> elements. For example:

public string GetMessage() => "Hello from lambda method";

srcML

<expr_stmt><expr><specifier>public</specifier> <name>string</name> <name>GetMessage</name><lambda><parameter_list>()</parameter_list> =&gt;<block type="pseudo"><block_content> <expr><literal type="string">"Hello from lambda method"</literal></expr></block_content></block></lambda></expr>;</expr_stmt></unit>

Stereocode should identify expression-bodied members and parse them as methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions