Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PositionClassifier #79

Open
ftomassetti opened this issue Aug 9, 2024 · 1 comment
Open

Update PositionClassifier #79

ftomassetti opened this issue Aug 9, 2024 · 1 comment

Comments

@ftomassetti
Copy link
Member

Position used to be a Concept while now it is a PrimitiveType.
We should update

export const PositionFeature = ASTNode.features.find(f => f.name == "position")! as Containment;
export const PositionClassifier = PositionFeature.type!;

@martin-azpillaga
Copy link

In the meantime, this works:

let position = starlasu.entities.find(x => x.id === "com-strumenta-StarLasu-Position-id");
let primitiveTypeDeserializer = new DefaultPrimitiveTypeDeserializer();
primitiveTypeDeserializer.registerDeserializer(position, value =>
{
	let [_, startLine, startColumn, endLine, endColumn] = value.match(/L(\d+):(\d+) to L(\d+):(\d+)/);
	return new Position(new Point(startLine, startColumn), new Point(endLine, endColumn));
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants