From e853153008b2e8aeb993e64d54edbbdf0d3b5e5f Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Tue, 29 Apr 2025 05:48:36 -0500 Subject: [PATCH] Make html attributes not need curly braces if using string litterals --- src/compiler/parser.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/compiler/parser.cpp b/src/compiler/parser.cpp index f740ed7..8c34f95 100644 --- a/src/compiler/parser.cpp +++ b/src/compiler/parser.cpp @@ -428,12 +428,17 @@ namespace Tesses::CrossLang { std::string myVal = " " + key + "=\""; + SyntaxNode expr; + if(this->i < this->tokens.size() && this->tokens[this->i].type == LexTokenType::String) + { + expr = this->tokens[this->i++].text; - - + } + else { EnsureSymbol("{"); - auto expr = ParseExpression(); + expr = ParseExpression(); EnsureSymbol("}"); + } if(std::holds_alternative(expr)) { nodes.push_back(AdvancedSyntaxNode::Create(CompoundAssignExpression,true,{