All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.relogiclabs.json.schema.tree.Context Maven / Gradle / Ivy

Go to download

The New JSON Schema prioritizes simplicity, conciseness, and readability, making it user-friendly and accessible without the need for extensive prior knowledge. It offers efficient read-write facilities, precise JSON document definition through various data types and functions, and extensibility to meet modern web service diverse requirements.

There is a newer version: 1.12.1
Show newest version
package com.relogiclabs.json.schema.tree;

import lombok.Getter;
import org.antlr.v4.runtime.ParserRuleContext;

@Getter
public final class Context {
    private final ParserRuleContext parser;
    private final RuntimeContext runtime;
    private final Location location;

    public Context(ParserRuleContext parser, RuntimeContext runtime) {
        this.parser = parser;
        this.runtime = runtime;
        this.location = getLocation(parser);
    }

    private Location getLocation(ParserRuleContext parser) {
        var token = parser.getStart();
        return new Location(token.getLine(), token.getCharPositionInLine());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy