Merge pull request #2 from jbeda/copyright-notice

Add copyright notice to all files.
This commit is contained in:
Dave Cunningham 2016-02-21 00:35:09 -05:00
commit 1cbeb25e84
5 changed files with 80 additions and 4 deletions

16
ast.go
View File

@ -1,3 +1,19 @@
/*
Copyright 2016 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package jsonnet package jsonnet
import ( import (

View File

@ -1,3 +1,18 @@
/*
Copyright 2016 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package jsonnet package jsonnet
import ( import (

View File

@ -1,3 +1,18 @@
/*
Copyright 2016 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package jsonnet package jsonnet
import ( import (

View File

@ -1,3 +1,18 @@
/*
Copyright 2016 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package jsonnet package jsonnet
import ( import (
@ -90,7 +105,7 @@ func (p *parser) parseCommaList(end tokenKind, elementKind string) (*token, astN
got_comma := false got_comma := false
first := true first := true
for { for {
next := p.peek(); next := p.peek()
if !first && !got_comma { if !first && !got_comma {
if next.kind == tokenComma { if next.kind == tokenComma {
p.pop() p.pop()
@ -205,10 +220,10 @@ func (p *parser) parse(prec precedence) (astNode, error) {
return nil, err return nil, err
} }
return &astFunction{ return &astFunction{
astNodeBase: astNodeBase{locFromTokenAST(begin, body)}, astNodeBase: astNodeBase{locFromTokenAST(begin, body)},
parameters: params, parameters: params,
trailingComma: got_comma, trailingComma: got_comma,
body: body, body: body,
}, nil }, nil
} else { } else {
return nil, makeStaticError(fmt.Sprintf("Expected ( but got %v", next), next.loc) return nil, makeStaticError(fmt.Sprintf("Expected ( but got %v", next), next.loc)

View File

@ -1,3 +1,18 @@
/*
Copyright 2016 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package jsonnet package jsonnet
import ( import (