Add logical and comparison expressions
This commit is contained in:
@@ -51,6 +51,7 @@ export const nav = [
|
||||
{ title: 'Composition', slug: 'language/expression/composition' },
|
||||
{ title: 'Default', slug: 'language/expression/default' },
|
||||
{ title: 'Arithmetic', slug: 'language/expression/arithmetic' },
|
||||
{ title: 'Logical and Comparison', slug: 'language/expression/logical-and-comparison' },
|
||||
{ title: 'String Interpolation', slug: 'language/expression/string-interpolation' },
|
||||
],
|
||||
},
|
||||
|
||||
@@ -195,7 +195,7 @@ function isOperatorStart(char) {
|
||||
|
||||
function readOperator(source, start) {
|
||||
let index = start + 1;
|
||||
if (source[start] === '/' && source[index] === '/') return index + 1;
|
||||
if ((source[start] === '&' || source[start] === '|' || source[start] === '/') && source[index] === source[start]) return index + 1;
|
||||
if ((source[start] === '<' || source[start] === '>' || source[start] === '=' || source[start] === '!') && source[index] === '=') {
|
||||
index += 1;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ in
|
||||
schema.Service & {
|
||||
name = "api";
|
||||
port = 9000 + 443;
|
||||
feature.enable = 9000 + 443 > 9000 && true;
|
||||
}
|
||||
`,
|
||||
'schemas/service.dcdl': `Service = {
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user