Fixing lexer documentation to not make incorrect formatting.

This commit is contained in:
fosdick.io
2024-02-14 14:47:35 -07:00
parent 03c1044e58
commit ee34b30ef0
2 changed files with 28 additions and 21 deletions

View File

@@ -90,24 +90,24 @@ impl Lexer {
.replace("''", "'"))
}
// Possibilities:
// 1. MyTable[#Totals] or MyTable[#This Row]
// 2. MyTable[MyColumn]
// 3. MyTable[[My Column]]
// 4. MyTable[[#This Row], [My Column]]
// 5. MyTable[[#Totals], [MyColumn]]
// 6. MyTable[[#This Row], [Jan]:[Dec]]
// 7. MyTable[]
//
// Multiple specifiers are not supported yet:
// 1. MyTable[[#Data], [#Totals], [MyColumn]]
//
// In particular note that names of columns are escaped only when they are in the first argument
// We use '[' and ']'
// When there is only a specifier but not a reference the specifier is not in brackets
//
// Invalid:
// * MyTable[#Totals, [Jan]:[March]] => MyTable[[#Totals], [Jan]:[March]]
/// Possibilities:
/// 1. MyTable[#Totals] or MyTable[#This Row]
/// 2. MyTable[MyColumn]
/// 3. MyTable[[My Column]]
/// 4. MyTable[[#This Row], [My Column]]
/// 5. MyTable[[#Totals], [MyColumn]]
/// 6. MyTable[[#This Row], [Jan]:[Dec]]
/// 7. MyTable[]
///
/// Multiple specifiers are not supported yet:
/// 1. MyTable[[#Data], [#Totals], [MyColumn]]
///
/// In particular note that names of columns are escaped only when they are in the first argument
/// We use '[' and ']'
/// When there is only a specifier but not a reference the specifier is not in brackets
///
/// Invalid:
/// * MyTable[#Totals, [Jan]:[March]] => MyTable[[#Totals], [Jan]:[March]]
//
// NOTES:
// * MyTable[[#Totals]] is translated into MyTable[#Totals]