Skip to content

Commit

Permalink
[error] Update for 0-based column numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
pfusik committed Mar 19, 2024
1 parent 3af3385 commit 4e8310e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion GenBase.fu
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public abstract class GenBase : FuVisitor

void ReportError(FuStatement statement, string message)
{
this.Host.ReportError(GetCurrentContainer().Filename, statement.Line, 1, statement.Line, 1, message);
this.Host.ReportError(GetCurrentContainer().Filename, statement.Line, 0, statement.Line, 0, message);
}

protected void NotSupported(FuStatement statement, string feature)
Expand Down
2 changes: 1 addition & 1 deletion Sema.fu
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class FuSema

protected void ReportError(FuStatement statement, string message)
{
this.Host.ReportError(GetCurrentContainer().Filename, statement.Line, 1, statement.Line, 1,message);
this.Host.ReportError(GetCurrentContainer().Filename, statement.Line, 0, statement.Line, 0,message);
}

FuType# PoisonError(FuStatement statement, string message)
Expand Down
4 changes: 2 additions & 2 deletions libfut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4087,7 +4087,7 @@ const FuContainerType * FuSema::getCurrentContainer() const

void FuSema::reportError(const FuStatement * statement, std::string_view message) const
{
this->host->reportError(getCurrentContainer()->filename, statement->line, 1, statement->line, 1, message);
this->host->reportError(getCurrentContainer()->filename, statement->line, 0, statement->line, 0, message);
}

std::shared_ptr<FuType> FuSema::poisonError(const FuStatement * statement, std::string_view message) const
Expand Down Expand Up @@ -6448,7 +6448,7 @@ const FuContainerType * GenBase::getCurrentContainer() const

void GenBase::reportError(const FuStatement * statement, std::string_view message) const
{
this->host->reportError(getCurrentContainer()->filename, statement->line, 1, statement->line, 1, message);
this->host->reportError(getCurrentContainer()->filename, statement->line, 0, statement->line, 0, message);
}

void GenBase::notSupported(const FuStatement * statement, std::string_view feature) const
Expand Down
4 changes: 2 additions & 2 deletions libfut.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4418,7 +4418,7 @@ public void SetHost(FuSemaHost host)

protected void ReportError(FuStatement statement, string message)
{
this.Host.ReportError(GetCurrentContainer().Filename, statement.Line, 1, statement.Line, 1, message);
this.Host.ReportError(GetCurrentContainer().Filename, statement.Line, 0, statement.Line, 0, message);
}

FuType PoisonError(FuStatement statement, string message)
Expand Down Expand Up @@ -6638,7 +6638,7 @@ protected virtual FuContainerType GetCurrentContainer()

void ReportError(FuStatement statement, string message)
{
this.Host.ReportError(GetCurrentContainer().Filename, statement.Line, 1, statement.Line, 1, message);
this.Host.ReportError(GetCurrentContainer().Filename, statement.Line, 0, statement.Line, 0, message);
}

protected void NotSupported(FuStatement statement, string feature)
Expand Down
4 changes: 2 additions & 2 deletions libfut.js
Original file line number Diff line number Diff line change
Expand Up @@ -4556,7 +4556,7 @@ export class FuSema

reportError(statement, message)
{
this.#host.reportError(this.#getCurrentContainer().filename, statement.line, 1, statement.line, 1, message);
this.#host.reportError(this.#getCurrentContainer().filename, statement.line, 0, statement.line, 0, message);
}

#poisonError(statement, message)
Expand Down Expand Up @@ -6922,7 +6922,7 @@ export class GenBase extends FuVisitor

#reportError(statement, message)
{
this.#host.reportError(this.getCurrentContainer().filename, statement.line, 1, statement.line, 1, message);
this.#host.reportError(this.getCurrentContainer().filename, statement.line, 0, statement.line, 0, message);
}

notSupported(statement, feature)
Expand Down

0 comments on commit 4e8310e

Please sign in to comment.