Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
urbic committed May 3, 2024
1 parent 3d54d57 commit f0f74c1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
5 changes: 4 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
access="public"
encoding="UTF-8"
charset="UTF-8"
doctitle="Psylla ${project.version}"
windowtitle="Psylla ${project.version}"
>
<module name="${project.moduleprefix}"/>
Expand All @@ -221,14 +222,16 @@
<classpath refid="classpath.main"/>
<arg value="--add-reads=${project.moduleprefix}=ALL-UNNAMED"/>
<arg value="--add-reads=${project.moduleprefix}.tools=ALL-UNNAMED"/>
<arg value="-Xdoclint:missing,reference"/>
<!--arg value="-Xdoclint:missing,reference,syntax"/-->
<arg value="-Xdoclint:all"/>
<arg value="-Xmaxwarns"/>
<arg value="1000"/>
<link href="file://${config.javadocdir.java}"/>
<link href="https://ant.apache.org/manual/api/"/>
<link href="file://${config.javadocdir.junit4}"/>
<link href="file://${config.javadocdir.jline1}"/>
<link href="file://${config.javadocdir.clianthus}"/>
<bottom>Copyright © 2014—2024 ${project.developer.name}</bottom>
</javadoc>
</target>

Expand Down
2 changes: 1 addition & 1 deletion src/ant/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ project.moduleprefix=${project.maven.groupId}.${project.maven.artifactId}
project.name=${ant.project.name}
project.nameversion=${project.name}-${project.version}
project.purl=pkg:github/${project.developer.id}/${project.name}
project.scm.connection=scm:git:git@github.com:${project.developer.id}/${project.name}.git
project.scm.connection=scm:git:http://github.com:${project.developer.id}/${project.name}
project.scm.developerConnection=scm:git:git@github.com:${project.developer.id}/${project.name}.git
project.scm.url=https://github.com/${project.developer.id}/${project.name}
project.summary=The Psylla programming language
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package coneforest.psylla.core;

import coneforest.psylla.*;
import java.util.Stack;
import java.util.StringJoiner;

@Type("error")
Expand All @@ -9,6 +10,7 @@ abstract public class PsyErrorException
extends Exception
implements PsyExecutable
{
@Override
public void invoke(final PsyContext oContext)
{
try
Expand Down Expand Up @@ -51,7 +53,7 @@ public void invoke(final PsyContext oContext)

public String getName()
{
var agenda=new java.util.Stack<Class<?>>();
var agenda=new Stack<Class<?>>();
agenda.push(getClass());

while(agenda.size()>0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,14 @@ default public PsyRational psyNeg()
default public PsyRealNumeric psyAdd(final PsyRealNumeric oRealNumeric)
{
if(oRealNumeric instanceof PsyIntegral oIntegral)
{
return of(
(PsyIntegral)psyNumerator().psyAdd(psyDenominator().psyMul(oIntegral)),
psyDenominator());
}
if(oRealNumeric instanceof PsyRational oRational)
{
return of(
(PsyIntegral)psyNumerator().psyMul(oRational.psyDenominator())
.psyAdd(psyDenominator().psyMul(oRational.psyNumerator())),
(PsyIntegral)psyDenominator().psyMul(oRational.psyDenominator()));
}
if(oRealNumeric instanceof PsyReal oReal)
return new PsyReal(doubleValue()+oReal.doubleValue());
throw new ClassCastException();
Expand All @@ -61,18 +57,14 @@ default public PsyRealNumeric psyAdd(final PsyRealNumeric oRealNumeric)
default public PsyRealNumeric psySub(final PsyRealNumeric oRealNumeric)
{
if(oRealNumeric instanceof PsyIntegral oIntegral)
{
return of(
(PsyIntegral)psyNumerator().psySub(psyDenominator().psyMul(oIntegral)),
psyDenominator());
}
if(oRealNumeric instanceof PsyRational oRational)
{
return of(
(PsyIntegral)psyNumerator().psyMul(oRational.psyDenominator())
.psySub(psyDenominator().psyMul(oRational.psyNumerator())),
(PsyIntegral)psyDenominator().psyMul(oRational.psyDenominator()));
}
if(oRealNumeric instanceof PsyReal oReal)
return new PsyReal(doubleValue()+oReal.doubleValue());
throw new ClassCastException();
Expand Down

0 comments on commit f0f74c1

Please sign in to comment.