词法语法¶
QL 语法包括不同类型的关键字、标识符和注释。
有关词法语法的概述,请参阅 QL 语言规范中的“词法语法”。
注释¶
所有标准的单行和多行注释都会被 QL 编译器忽略,并且仅在源代码中可见。你还可以编写另一种类型的注释,即 **QLDoc 注释**。这些注释描述 QL 实体,并在 QL 编辑器中显示为弹出信息。
以下示例使用了这三种不同的注释类型
/**
* A QLDoc comment that describes the class `Digit`.
*/
class Digit extends int { // A short one-line comment
Digit() {
this in [0 .. 9]
}
}
/*
A standard multiline comment, perhaps to provide
additional details, or to write a TODO comment.
*/