From d43f6ac43412ef653caf0dd2c3b9ef3fcb443169 Mon Sep 17 00:00:00 2001 From: Pier Paolo MAMMI Date: Tue, 18 Aug 2026 12:48:20 +0200 Subject: [PATCH] split samples for correct parsing --- examples/sample1.eftl | 20 ++++++++++++++++++++ examples/{sample.eftl => sample2.eftl} | 23 ----------------------- 2 files changed, 20 insertions(+), 23 deletions(-) create mode 100644 examples/sample1.eftl rename examples/{sample.eftl => sample2.eftl} (54%) diff --git a/examples/sample1.eftl b/examples/sample1.eftl new file mode 100644 index 0000000..d1b5b74 --- /dev/null +++ b/examples/sample1.eftl @@ -0,0 +1,20 @@ +[!-- Example EFTL file for testing syntax highlighting --] +[EFTL][HEADER name="trimDocument" value="true" type="boolean" /] +[VAR name="isRichiedenteInPartecipanti" type="string"][% isRichiedenteInPartecipanti = "Utente non ammesso!"; %][/VAR] +[VAR name="partecipanti" type="string"][TAG]GETVALUEBYTAG,CONTRATTO_PARTECIPANTI,REQUEST,IUQOID[/TAG][/VAR] +[VAR name="nominativoUtente" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_NOMINATIVO,REQUEST,IUQOID[/TAG][/VAR] + +[!-- Check if user is in participants list --] +[% nominativoUtente = " " + nominativoUtente + ", CF: "; %] + +[IF] + [CONDITION][CONTAINS varname="partecipanti"][VALUE_OF varname="nominativoUtente" /][/CONTAINS][/CONDITION] + [THEN][% isRichiedenteInPartecipanti = ""; %][/THEN] + [ELSE IF] + [CONDITION][% partecipanti == "" %][/CONDITION] + [THEN][% isRichiedenteInPartecipanti = "Nessun partecipante trovato"; %][/THEN] + [/ELSE IF] +[/IF] + +[%= isRichiedenteInPartecipanti %] +[/EFTL] \ No newline at end of file diff --git a/examples/sample.eftl b/examples/sample2.eftl similarity index 54% rename from examples/sample.eftl rename to examples/sample2.eftl index cba686b..9356349 100644 --- a/examples/sample.eftl +++ b/examples/sample2.eftl @@ -1,27 +1,4 @@ -[!-- Example EFTL file for testing syntax highlighting --] - -[EFTL][HEADER name="trimDocument" value="true" type="boolean" /] -[VAR name="isRichiedenteInPartecipanti" type="string"][% isRichiedenteInPartecipanti = "Utente non ammesso!"; %][/VAR] -[VAR name="partecipanti" type="string"][TAG]GETVALUEBYTAG,CONTRATTO_PARTECIPANTI,REQUEST,IUQOID[/TAG][/VAR] -[VAR name="nominativoUtente" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_NOMINATIVO,REQUEST,IUQOID[/TAG][/VAR] - -[!-- Check if user is in participants list --] -[% nominativoUtente = " " + nominativoUtente + ", CF: "; %] - -[IF] - [CONDITION][CONTAINS varname="partecipanti"][VALUE_OF varname="nominativoUtente" /][/CONTAINS][/CONDITION] - [THEN][% isRichiedenteInPartecipanti = ""; %][/THEN] - [ELSE IF] - [CONDITION][% partecipanti == "" %][/CONDITION] - [THEN][% isRichiedenteInPartecipanti = "Nessun partecipante trovato"; %][/THEN] - [/ELSE IF] -[/IF] - -[%= isRichiedenteInPartecipanti %] -[/EFTL] - [!-- Another example with loops and calculations --] - [EFTL][HEADER name="trimDocument" value="true" type="boolean" /] [VAR name="IDX_NOME" type="number"][% IDX_NOME = 0; %][/VAR] [VAR name="IDX_SEDE" type="number"][% IDX_SEDE = 2; %][/VAR]