Merge pull request #2 from mingweishih/update_license

Update license
This commit is contained in:
Ming-Wei Shih
2023-02-09 11:42:20 -08:00
committed by GitHub
70 changed files with 160 additions and 130 deletions

11
.cargo/config.toml Normal file
View File

@@ -0,0 +1,11 @@
[build]
target = "x86_64-unknown-linux-musl"
# Flags to enable code-coverage for all builds.
# These can be removed later.
rustflags = ["-Cinstrument-coverage"]
incremental = true
[env]
# Name of coverage instrumentation log file.
LLVM_PROFILE_FILE="target/cargo-test-%p-%m.profraw"

View File

@@ -1,5 +1,6 @@
// Copyright (c) Rego-Rs Authors.
// Licensed under the Apache 2.0 license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
use anyhow::Result;
fn main() -> Result<()> {

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
set -e

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
git stash
cargo doc --no-deps

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
set -eo pipefail

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
set -eo pipefail

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
set -e
rego=$(realpath -e $1)

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
set -e

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
set -e

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
set -e
yaml=$(realpath -e $1)

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
set -e
yaml=$(realpath -e $1)

View File

@@ -1,5 +1,5 @@
// Copyright (c) Rego-Rs Authors.
// Licensed under the Apache 2.0 license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
use crate::lexer::*;

View File

@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
use crate::ast::*;
use crate::value::{Value::*, *};

View File

@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
mod compare;
pub use self::compare::*;

View File

@@ -1,5 +1,6 @@
// Copyright (c) Rego-Rs Authors.
// Licensed under the Apache 2.0 license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
use crate::ast::*;
use crate::builtins;
use crate::lexer::Span;

View File

@@ -1,5 +1,5 @@
// Copyright (c) Rego-Rs Authors.
// Licensed under the Apache 2.0 license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
use core::fmt::{Debug, Formatter};
use core::iter::Peekable;

View File

@@ -1,5 +1,5 @@
// Copyright (c) Rego-Rs Authors.
// Licensed under the Apache 2.0 license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
pub mod ast;
pub mod builtins;

View File

@@ -1,5 +1,5 @@
// Copyright (c) Rego-Rs Authors.
// Licensed under the Apache 2.0 license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
use crate::ast::*;
use crate::lexer::*;

View File

@@ -1,5 +1,5 @@
// Copyright (c) Rego-Rs Authors.
// Licensed under the Apache 2.0 license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
use core::fmt;
use std::collections::{BTreeMap, BTreeSet};

View File

@@ -1,5 +1,6 @@
// Copyright (c) Rego-Rs Authors.
// Licensed under the Apache 2.0 license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![cfg(test)]
use crate::interpreter::*;

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- data: {}
modules:

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: number-equals

View File

@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: basic
data: {}

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Captures tricky cases where similar looking expressions will be
# treated as arrays or array-comprs.

View File

@@ -1,5 +1,5 @@
// Copyright (c) Rego-Rs Authors.
// Licensed under the Apache 2.0 license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![cfg(test)]
use crate::interpreter::*;

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: simple

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: basic

View File

@@ -1,5 +1,6 @@
// Copyright (c) Rego-Rs Authors.
// Licensed under the Apache 2.0 license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![cfg(test)]
use crate::interpreter::*;

View File

@@ -1,5 +1,5 @@
// Copyright (c) Rego-Rs Authors.
// Licensed under the Apache 2.0 license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
mod arithmetic;
mod compr;

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: simple

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: simple

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: index-syntax

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: basic

View File

@@ -1,5 +1,5 @@
// Copyright (c) Rego-Rs Authors.
// Licensed under the Apache 2.0 license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![cfg(test)]
use crate::interpreter::*;

View File

@@ -1,5 +1,6 @@
// Copyright (c) Rego-Rs Authors.
// Licensed under the Apache 2.0 license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![cfg(test)]
use std::env;

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- rego: |

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
# To Booleans are parsed as identifiers.

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: comments-immediately-following/1

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
# All other yamls lock down eof.

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: all

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: carriage-return/ok

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
# Valid integers

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: positive

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: positive

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
# Two single char symbols in a row must be parsed correctly.

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: valid

View File

@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![cfg(test)]
use anyhow::{bail, Result};

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: basic

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: basic

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: case1-compr

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: all

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: basic

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: basic

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: basic

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: basic

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: basic

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: all

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: case1-compr

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: all

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: namespace

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: data

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: single-char

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: same-line-no-body

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: no-query

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: contains

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: all

View File

@@ -1,5 +1,5 @@
# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: single-multi-vars

View File

@@ -1,5 +1,6 @@
// Copyright (c) Rego-Rs Authors.
// Licensed under the Apache 2.0 license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![cfg(test)]
use anyhow::{anyhow, bail, Result};

View File

@@ -1,5 +1,5 @@
// Copyright (c) Rego-Rs Authors.
// Licensed under the Apache 2.0 license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
mod interpreter;
mod lexer;

View File

@@ -1,5 +1,6 @@
// Copyright (c) Rego-Rs Authors.
// Licensed under the Apache 2.0 license.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![cfg(test)]
use anyhow::Result;