English
Appearance
Tyrus supports line and block comments. Comments are discarded by the lexer and do not affect semantic analysis or native code generation.
// A line comment continues to the end of the current line. const enabled: boolean = true;
/* A block comment may span more than one physical line. */ const retries: u32 = 3;
Documentation comments attach structured text to declarations. The Language Server uses them in hover and completion.
/** * Sends a welcome message. * @param email Destination e-mail address. * @returns true when the message was accepted. */ function sendWelcome(email: string): boolean { return email.includes("@"); }
Supported tags include @param, @returns, @deprecated, and @example.
@param
@returns
@deprecated
@example
Comments inside strings are text
Comment delimiters inside quoted strings and template literals are string content, not comments.
const marker: string = "/* not a comment */"; const line: string = "// also not a comment";
Comments
Tyrus supports line and block comments. Comments are discarded by the lexer and do not affect semantic analysis or native code generation.
Line Comments
Block Comments
Documentation Comments
Documentation comments attach structured text to declarations. The Language Server uses them in hover and completion.
Supported tags include
@param,@returns,@deprecated, and@example.Comments inside strings are text
Comment delimiters inside quoted strings and template literals are string content, not comments.