Corentin Derbois avatar Corentin Derbois committed 9ce187a

Add node but, will be never used

Comments (0)

Files changed (2)

 SRCSLEX			=	lexer.mll
 SRCSYACC		=	parser.mly
 
-SRCS				= $(SRCSLEX:.mll=.ml) $(SRCSYACC:.mly=.ml)
+SRCS				= node.ml $(SRCSLEX:.mll=.ml) $(SRCSYACC:.mly=.ml)
 SRCS				+= visitor.ml 
 SRCS				+= wrapper.ml compiler.ml option.ml main.ml
 
+class node =
+  object(this)
+
+    (* here put visitor function *)
+
+  end
+
+type nodeValue = None | Some of node
+
+class notYet where =
+  object(this)
+
+    inherit node
+
+  end
+
+let newNotYet where () =
+  print_endline where;
+  let a = new notYet where in
+    a
+
+class func = 
+  object(this)
+
+    inherit node
+
+    val mutable claration_specifiers = None
+    val mutable declarator = None
+    val mutable declaration_list = None
+    val mutable compound_statement = None
+
+    method init cs d dl cos =
+      claration_specifiers <- cs;
+      declarator <- d;
+      declaration_list <- dl;
+      compound_statement <- cos
+
+  end
+
+let newFunc cs d dl cos () = 
+  let a = new func in
+    a#init cs d dl cos;
+    a
+
+class transUnit =
+  object(this)
+
+    inherit node
+
+    val mutable translation_unit = None
+    val mutable external_declaration = None
+    
+    method init tu ed =
+      translation_unit <- tu;
+      external_declaration <- ed
+  end
+
+let newTransUnit tu ed () =
+  let a = new transUnit in
+    a#init tu ed;
+    a
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.