Skip to content
Snippets Groups Projects
Select Git revision
  • 1b5d6171b2d83f33f2a8b0ace67e1630f0697d10
  • master default protected
  • yassin.elhakoun-master-patch-35538
  • yassin.elhakoun-master-patch-06640
  • yassin.elhakoun-master-patch-05495
  • yassin.elhakoun-master-patch-26727
  • yassin.elhakoun-master-patch-76337
7 results

cours_22.md

Blame
  • Forked from algorithmique / cours
    Source project has a limited visibility.
    ASTNode.java 998 B
    /*
     * Base class that represent a node inside the AST.
     */
    
    public abstract class ASTNode {
        /**
         * File where it has been found
         */
        private String filename = "";
        /**
         * Line where it has been found
         */
        private int line = -1;
        /**
         * Column where it has been found
         */
        private int column = -1;
    
        /**
         * Constructor
         */
        public ASTNode(String fl, int line, int col) {
            this.filename = fl;
            this.line = line;
            this.column = col;
        }
    
        /**
         * Return the filename where it has been found
         */
        public String getFilename() {
            return this.filename;
        }
        /**
         * Return the line where it has been found
         */
        public int getLine() {
            return this.line;
        }
        /**
         * Return the column where it has been found
         */
        public int getColumn() {
            return this.column;
        }
    
        /**
         * Accepts a AST visitor
         */
        abstract Object accept(ASTVisitor visitor);
    }