Make html attributes not need curly braces if using string litterals

This commit is contained in:
2025-04-29 05:48:36 -05:00
parent 295f56231d
commit e853153008

View File

@ -428,12 +428,17 @@ namespace Tesses::CrossLang
{ {
std::string myVal = " " + key + "=\""; 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("{"); EnsureSymbol("{");
auto expr = ParseExpression(); expr = ParseExpression();
EnsureSymbol("}"); EnsureSymbol("}");
}
if(std::holds_alternative<AdvancedSyntaxNode>(expr)) if(std::holds_alternative<AdvancedSyntaxNode>(expr))
{ {
nodes.push_back(AdvancedSyntaxNode::Create(CompoundAssignExpression,true,{ nodes.push_back(AdvancedSyntaxNode::Create(CompoundAssignExpression,true,{