Skip to content

Commit

Permalink
release 2.4.1-SNAPSHOT
Browse files Browse the repository at this point in the history
define "defaults" removed, only named and values are specified in the argument list
'macro' parop type is deprecated replaced by enum parop

Params can handle parameters comma separated
  • Loading branch information
verhas committed Aug 23, 2023
1 parent bfb0e32 commit fe94c26
Show file tree
Hide file tree
Showing 98 changed files with 665 additions and 618 deletions.
4 changes: 2 additions & 2 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
This file was generated from extensions.jam in the same directory as extensions.xml
The latest version is 2.3.0.
The latest version is 2.4.0.
--><extensions>
<extension>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-maven-extension</artifactId>
<version>2.3.0</version>
<version>2.4.0</version>
</extension>
</extensions>
6 changes: 3 additions & 3 deletions BUILTIN.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ You need the following dependency in your project:
<dependency>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-api</artifactId>
<version>2.4.0</version>
<version>2.4.1-SNAPSHOT</version>
</dependency>
----

Expand All @@ -50,7 +50,7 @@ In later versions, when we will do a bit more in our macros we will also need th
<dependency>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-tools</artifactId>
<version>2.4.0</version>
<version>2.4.1-SNAPSHOT</version>
</dependency>
----

Expand Down Expand Up @@ -107,7 +107,7 @@ To use the test support library you have to add the dependency to your `pom.xml`
<dependency>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-testsupport</artifactId>
<version>2.4.0</version>
<version>2.4.1-SNAPSHOT</version>
<scope>test</scope>
</dependency>
----
Expand Down
7 changes: 5 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ TOC
|===


NOTE: This is the latest development documentation.
This is a SNAPSHOT version (2.4.1-SNAPSHOT).
If you want to read the latest release, please visit link:{jamal_home}/tree/v2.3.0[Jamal 2.3.0]



Expand Down Expand Up @@ -70,7 +73,7 @@ Having that you can issue the command:

[source]
----
mvn com.javax0.jamal:jamal-maven-plugin:2.4.0:jamal
mvn com.javax0.jamal:jamal-maven-plugin:2.4.1-SNAPSHOT:jamal
----

if you have a `pom.xml` file in your directory.
Expand All @@ -93,7 +96,7 @@ Create a `.mvn` directory with an `extensions.xml` file in your project root.
<extension>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-maven-extension</artifactId>
<version>2.4.0</version>
<version>2.4.1-SNAPSHOT</version>
</extension>
</extensions>
---
Expand Down
26 changes: 16 additions & 10 deletions RELEASES.jim
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ The symbolic names we use are city names.
Some releases got symbolic names retrospectively.
This is the case when the release was already published and the symbolic name was not used in the documentation.
You can find some bare release numbers in the documentation even though the existence of the symbolic name.
{@define RELEASE:ZURICH=1.0.0}
{@define RELEASE:KLOTEN=1.3.0}
{@define RELEASE:SZEGED=1.5.0}
{@define RELEASE:RORBAS=1.5.4}
{@define RELEASE:BERN=1.6.4}
{@define RELEASE:LUZERN=1.7.4}
{@define RELEASE:BASEL=1.7.6}
{@define RELEASE:OBERGLATT=1.9.0}
{@define RELEASE:EMBRACH=1.9.1}
{@define RELEASE:LUGANO=1.12.3}
{@define ! RELEASE:ZURICH=1.0.0}
{@define ! RELEASE:KLOTEN=1.3.0}
{@define ! RELEASE:SZEGED=1.5.0}
{@define ! RELEASE:BUELACH=1.5.3}
{@define ! RELEASE:RORBAS=1.5.4}
{@define ! RELEASE:BERN=1.6.4}
{@define ! RELEASE:SZIKSZO=1.7.3}
{@define ! RELEASE:LUZERN=1.7.4}
{@define ! RELEASE:BASEL=1.7.6}
{@define ! RELEASE:OBERGLATT=1.9.0}
{@define ! RELEASE:EMBRACH=1.9.1}
{@define ! RELEASE:ZOLLIKOFEN=1.11.0}
{@define ! RELEASE:LUGANO=1.12.3}

my parents were there once
{@define RELEASE:ULANBATOR=1.12.3}
Expand Down Expand Up @@ -52,3 +55,6 @@ Izmir is a Turkish city, famous for its film festival.
I was lucky to meet Roger Worrod who was frequent visitor of the festival.
I have never been there.
{@define RELEASE:IZMIR=2.4.0}

a town very north in Russia
{@define RELEASE:ROGACHEVO=2.4.1-SNAPSHOT}
2 changes: 1 addition & 1 deletion documentation/JAMAL_API.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ If you use Maven, you can simply have
<dependency>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-engine</artifactId>
<version>2.4.0</version>
<version>2.4.1-SNAPSHOT</version>
</dependency>
----

Expand Down
2 changes: 1 addition & 1 deletion documentation/SAMPLE_README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@


How to use Jamal in five minutes.
This is a sample readme of the version `2.4.0`.
This is a sample readme of the version `2.4.1-SNAPSHOT`.


2 changes: 1 addition & 1 deletion documentation/TUTORIAL-5min.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ The result, processed by Jamal finally is:
How to use Jamal in five minutes.
This is a sample readme of the version `2.4.0`.
This is a sample readme of the version `2.4.1-SNAPSHOT`.
Expand Down
35 changes: 5 additions & 30 deletions documentation/macros/define.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1068,20 +1068,16 @@ This option can be used together with the name containing `:`.

== Default Parameters

The option `default` can be used to define default values for the arguments.
The option `named` can be used to create a user-defined macro that ues named parameters.
When this option is used, the macro invocation has a different syntax.
In this case, the parameters must be named in arbitrary order just like the parops for the built-in macros.
In this case, the parameters are given with the names in a similar syntax to the parops of the built-in macros.

For example:

.Jamal source
[source]
----
{@define [defaults="""
a=1
b=2
c=3
"""] Z(a,b,c)=a b c}{Z a=4 c=5}
{@define [named] Z(a=1,b=2,c=3)=a b c}{Z a=4 c=5}
----

will result in
Expand All @@ -1095,32 +1091,11 @@ will result in

The parameter option parsing, as described in the document link:../PAROPS.adoc[Parameter Options], is used to fetch the values of the parameters.
The default values are used only if the parameter is not provided.
The format for the default value is a multi-line string with the format:

.Jamal source
[source]
----
name1=value1
name2=value2
name3=value3
...
nameN=valueN
----

Each line can define a default value for a parameter.
It is an error to specify the same parameter name more than once.
It is also an error to specify a string that is not a parameter name.

The values for the default values are somewhat restricted, because they cannot be multi-line strings.
This is usually not needed for this type of macro.
A possible workaround is to define a global macro with the content and then use that macro as the default value.
It will be evaluated following the macro evaluation unless the macro is also declared as, or used verbatim.

The macros defined using the `default` option can not be serialized.
The macros defined using the `named` option can not be serialized.
It means that they cannot be used, for example, with the snippet library `reference` macro.

The syntax and use of default parameters is experimental as of the release 2.4.0 and it may change in the future.
The change may also break backward compatibility.
NOTE: The syntax and use of default parameters was experimental in the release 2.4.0 and it changed.

== Special User Defined Macros

Expand Down
34 changes: 5 additions & 29 deletions documentation/macros/define.adoc.jam
Original file line number Diff line number Diff line change
Expand Up @@ -780,18 +780,14 @@ This option can be used together with the name containing `:`.

== Default Parameters

The option `default` can be used to define default values for the arguments.
The option `named` can be used to create a user-defined macro that ues named parameters.
When this option is used, the macro invocation has a different syntax.
In this case, the parameters must be named in arbitrary order just like the parops for the built-in macros.
In this case, the parameters are given with the names in a similar syntax to the parops of the built-in macros.

For example:

{%sample/
{@define [defaults="""
a=1
b=2
c=3
"""] Z(a,b,c)=a b c}{Z a=4 c=5}
{@define [named] Z(a=1,b=2,c=3)=a b c}{Z a=4 c=5}
%}

will result in
Expand All @@ -800,31 +796,11 @@ will result in

The parameter option parsing, as described in the document {%PAROPS%}, is used to fetch the values of the parameters.
The default values are used only if the parameter is not provided.
The format for the default value is a multi-line string with the format:

{%sample/
name1=value1
name2=value2
name3=value3
...
nameN=valueN

%}

Each line can define a default value for a parameter.
It is an error to specify the same parameter name more than once.
It is also an error to specify a string that is not a parameter name.

The values for the default values are somewhat restricted, because they cannot be multi-line strings.
This is usually not needed for this type of macro.
A possible workaround is to define a global macro with the content and then use that macro as the default value.
It will be evaluated following the macro evaluation unless the macro is also declared as, or used verbatim.

The macros defined using the `default` option can not be serialized.
The macros defined using the `named` option can not be serialized.
It means that they cannot be used, for example, with the snippet library `reference` macro.

The syntax and use of default parameters is experimental as of the release {%RELEASE:IZMIR%} and it may change in the future.
The change may also break backward compatibility.
NOTE: The syntax and use of default parameters was experimental in the release {%RELEASE:IZMIR%} and it changed.

== Special User Defined Macros

Expand Down
Loading

0 comments on commit fe94c26

Please sign in to comment.