Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit d15f2d4

Browse files
committed
moved source files under src/ directory
1 parent 2d68ea5 commit d15f2d4

23 files changed

+17
-28
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ node_modules/
33
package-lock.json
44
build-convert/target
55
build-convert/Cargo.lock
6-
node.h
7-
node.cc
6+
src/node.h
7+
src/node.cc
88

99
lib-ruby-parser.a
10-
lib-ruby-parser.h
10+
src/lib-ruby-parser.h

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@ clean:
6969
# // cpp bindings files
7070

7171
download-cpp-bindings:
72-
wget -q $(HEADER_URL) -O lib-ruby-parser.h
72+
wget -q $(HEADER_URL) -O src/lib-ruby-parser.h
7373
wget -q $(LIB_URL) -O $(LOCAL_LIB_NAME)

binding.gyp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
{
44
"target_name": "ruby_parser",
55
"sources": [
6-
"node_bindings.cc",
7-
"loc.cc",
8-
"input.cc",
9-
"bytes.cc",
10-
"token.cc",
11-
"diagnostic.cc",
12-
"comment.cc",
13-
"magic_comment.cc",
14-
"node.cc",
15-
"parser_result.cc",
6+
"src/node_bindings.cc",
7+
"src/loc.cc",
8+
"src/input.cc",
9+
"src/bytes.cc",
10+
"src/token.cc",
11+
"src/diagnostic.cc",
12+
"src/comment.cc",
13+
"src/magic_comment.cc",
14+
"src/node.cc",
15+
"src/parser_result.cc",
1616
],
1717
"include_dirs": [
1818
"<!@(node -p \"require('node-addon-api').include\")",
19-
"."
19+
"src"
2020
],
2121
"cflags_cc": [ "-std=c++17" ],
2222
"xcode_settings": {

build-convert/build.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
extern crate lib_ruby_parser_nodes;
22

33
use lib_ruby_parser_nodes::{Field, Node};
4-
use std::path::Path;
5-
6-
fn relative_path(path: &str) -> String {
7-
Path::new(file!())
8-
.parent()
9-
.unwrap()
10-
.join(path)
11-
.to_str()
12-
.unwrap()
13-
.to_owned()
14-
}
154

165
fn build_comparison(node: &Node) -> String {
176
format!(
@@ -198,6 +187,6 @@ namespace lib_ruby_parser_node
198187
init_exports = init_exports.join("\n ")
199188
);
200189

201-
std::fs::write("../node.h", &node_h).unwrap();
202-
std::fs::write("../node.cc", &node_cc).unwrap();
190+
std::fs::write("../src/node.h", &node_h).unwrap();
191+
std::fs::write("../src/node.cc", &node_cc).unwrap();
203192
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)