Skip to content

Commit

Permalink
paper examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Th0mz committed May 10, 2024
1 parent 6662647 commit 3c53a47
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mdg/graph.ml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ and print_node (location : location) (node : Node.t) : unit =
print_endline (Node.to_string node ^ " " ^ location)



(* ------- A U X I L I A R Y F U N C T I O N S -------*)
let get_edges (graph : t) (origin : location) : EdgeSet.t =
map_default identity EdgeSet.empty (find_edges_opt graph origin)
Expand Down
9 changes: 9 additions & 0 deletions test/example-fig1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// function params
let config = {}
let op = 1 + 2
let branch_name = 2 + 3
let url = 4 + 5

const options = config[op]
options[branch_name] = url
options.cmd = "git reset"
13 changes: 13 additions & 0 deletions test/example-fig8.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// function params
let obj = {}
var dotPath = {}
let value = {}

const path = dotPath.path
for (let i = 0; i < path.length; i++) {
const key = path[i]
if (i == path.length - 1) {
obj[key] = value
}
obj = obj[key]
}

0 comments on commit 3c53a47

Please sign in to comment.