Open P-E-P opened 8 months ago
Maybe we should wait for #2815 to be merged ? Also, rustc use unified Function and ExternalFunction, maybe we should do the same since function body is now optional ?
I will try this
@P-E-P Can I take up this issue ?
@yomanthunder sure go ahead, you can check the draft PR to get an idea which files will need changes
Rust keyword should be used in a given order
pub
default
const
async
unsafe
extern
Rust provides multiple messages and notes to help with that:
FunctionQualifier
structure to store the state of a function but not all those informations are kept in it.We should probably unify all those under one same structure (
FunctionQualifier
) and create a function to parse aFunctionQualifier
that could be used everytime we expect a function.This function could emit an error as well as a note (
rust_note
) when the syntax is wrong.Choose an appropriate API for this function. Should it return an
Optional<FunctionQualifier>
? Always return aFunctionQualifier
with private/safe/sync attributes ? Probably the latter.