Skip to content

Commit

Permalink
feat(AST generator): Add initial parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
kollhof committed Mar 15, 2019
1 parent 92952f8 commit 6eef50f
Show file tree
Hide file tree
Showing 68 changed files with 14,771 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

root: true

extends:
- '@nearmap/eslint-config-base'

rules:
camelcase: off
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# build outputs
build/

# Dependency directories
node_modules/


# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# dotenv environment variables file
.env

# macOS
.DS_Store

5 changes: 5 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"branch": "master",
"debug": true,
"pkgRoot": "build/pkg"
}
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: node_js
cache:
directories:
- ~/.npm

notifications:
email: false

node_js:
- '11'

jobs:
include:
- stage: test
script: npx run
- stage: publish
if: branch = master
script: npx run cd
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Nearmap

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# larix
# larix
An parser for generating fink's AST.

42 changes: 42 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

// eslint-disable-next-line no-undef
module.exports = {
// Common to all envs below.
plugins: [
// Makes sure babel does not include the same code snipped in each file,
// but imports helpers from a single module.
// '@babel/plugin-transform-runtime',
// '@babel/plugin-syntax-dynamic-import',
// '@babel/plugin-proposal-optional-catch-binding',
// '@babel/plugin-proposal-throw-expressions',
// '@babel/plugin-proposal-optional-chaining',
['@babel/plugin-proposal-pipeline-operator', {proposal: 'minimal'}]
],

env: {
// Used as the default for running babel-node scripts
development: {
sourceMaps: false,
presets: [
['@babel/preset-env', {
targets: {
node: 'current'
}
}]
]
},
// Jest runs with NODE_ENV=test and will use the following.
// We target the current node version to minimize transcompilation.
// This should speed up the test run and make it more debugable.
test: {
sourceMaps: 'both',
presets: [
['@babel/preset-env', {
targets: {
node: 'current'
}
}]
]
}
}
};
30 changes: 30 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

module.exports = {
setupFiles: [],
transform: {'^.+\\.js$': 'babel-jest'},
transformIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/build/'],

modulePathIgnorePatterns: ['<rootDir>/build/'],

testMatch: ['<rootDir>/**/*.test.js'],
testPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/build/'],
watchPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/build/'],

timers: 'fake',

clearMocks: true,
resetMocks: false,

collectCoverage: true,
collectCoverageFrom: ['<rootDir>/src/**/*.js'],
coverageDirectory: './build/cov',
coverageReporters: ['lcov'],
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100
}
}
};
Loading

0 comments on commit 6eef50f

Please sign in to comment.