Skip to content

Commit

Permalink
chore(misc): asset updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Alpert committed Jun 17, 2018
1 parent 97ec34d commit 0af23ac
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
9 changes: 9 additions & 0 deletions test/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "plugin:roku/recommended",
"rules": {
"roku/no-print": "warn",
"roku/no-stop": "warn",
"roku/sub-to-function": "off",
"roku/function-no-return": "off"
}
}
5 changes: 1 addition & 4 deletions test/assets/syntax.brs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function a()
a$="a rose is a rose"
a$ ="a rose is a rose"
b1=1.23
x=x-z1

Expand All @@ -12,9 +12,6 @@ function a()
end function





function gotoStatement()
mylabel:
print "Anthony was here!"
Expand Down
10 changes: 9 additions & 1 deletion test/ast.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fileAST, sourceAST } from './helpers'
import { fileAST, sourceAST /* , print */ } from './helpers'

describe('AST', () => {
test('Should be able to Parse AST', () => {
Expand Down Expand Up @@ -60,4 +60,12 @@ describe('AST', () => {
// console.log(inspect(ast, false, null, true))
}).not.toThrow()
})

test('Should be able parse inline AST #3', () => {
expect(() => {
/* const ast = */ sourceAST('m.top.findNode("label")', 'BlockStatement')

// print(ast)
}).not.toThrow()
})
})

0 comments on commit 0af23ac

Please sign in to comment.