Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import static dev.ionfusion.fusion.FusionSyntax.checkSyntaxArg;

import dev.ionfusion.runtime.base.FusionException;
import dev.ionfusion.runtime.base.SourceLocation;
import dev.ionfusion.runtime.base.ResourcePosition;


class SyntaxColumnProc
Expand All @@ -17,11 +17,11 @@ class SyntaxColumnProc
Object doApply(Evaluator eval, Object arg)
throws FusionException
{
SyntaxValue stx = checkSyntaxArg(eval, this, 0, arg);
SourceLocation location = stx.getLocation();
if (location != null)
SyntaxValue stx = checkSyntaxArg(eval, this, 0, arg);
Comment thread
toddjonker marked this conversation as resolved.
ResourcePosition pos = stx.getPosition();
if (pos != null)
{
return makeInt(eval, location.getColumn());
return makeInt(eval, pos.getColumn());
}
return FusionNumber.ZERO_INT;
}
Expand Down
10 changes: 5 additions & 5 deletions runtime/src/main/java/dev/ionfusion/fusion/SyntaxLineProc.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import static dev.ionfusion.fusion.FusionSyntax.checkSyntaxArg;

import dev.ionfusion.runtime.base.FusionException;
import dev.ionfusion.runtime.base.SourceLocation;
import dev.ionfusion.runtime.base.ResourcePosition;


class SyntaxLineProc
Expand All @@ -17,11 +17,11 @@ class SyntaxLineProc
Object doApply(Evaluator eval, Object arg)
throws FusionException
{
SyntaxValue stx = checkSyntaxArg(eval, this, 0, arg);
SourceLocation location = stx.getLocation();
if (location != null)
SyntaxValue stx = checkSyntaxArg(eval, this, 0, arg);
ResourcePosition pos = stx.getPosition();
if (pos != null)
{
return makeInt(eval, location.getLine());
return makeInt(eval, pos.getLine());
}
return FusionNumber.ZERO_INT;
}
Expand Down
Loading