language stringlengths 0 24 | filename stringlengths 9 214 | code stringlengths 99 9.93M |
|---|---|---|
Rust | hhvm/hphp/hack/src/elab/passes/elab_enum_class.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Abstraction;
use nast::Class_;
use nast::ClassishKind;
use nast::Expr_;
use nast::Hint;
use nast::Hint_;
use nast::Id;
use n... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_everything_sdt.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use naming_special_names_rust as sn;
use nast::ClassConst;
use nast::Class_;
use nast::ConstraintKind;
use nast::Enum_;
use nast::Expr... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_expr_call_call_user_func.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::CallExpr;
use nast::Expr;
use nast::Expr_;
use nast::Id;
use nast::ParamKind;
use nast::Pos;
use crate::prelude::*;
#[deri... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_expr_call_hh_invariant.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Block;
use nast::CallExpr;
use nast::Expr;
use nast::Expr_;
use nast::Id;
use nast::ParamKind;
use nast::Pos;
use nast::Stmt... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_expr_call_hh_meth_caller.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
// Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE ... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_expr_collection.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Afield;
use nast::CollectionTarg;
use nast::Expr;
use nast::Expr_;
use nast::Field;
use nast::Hint;
use nast::Hint_;
use nas... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_expr_import.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Expr;
use nast::Expr_;
use nast::Pos;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct ElabExprImportPass... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_expr_lvar.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Expr_;
use nast::Lid;
use nast::Pos;
use oxidized::local_id;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub st... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_expr_package.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use naming_special_names_rust::pseudo_functions;
use nast::CallExpr;
use nast::Expr;
use nast::Expr_;
use nast::Id;
use nast::ParamKin... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_expr_tuple.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Expr;
use nast::Expr_;
use crate::prelude::*;
/// Replace empty tuples with invalid expressions and record errors.
#[deriv... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_func_body.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Class_;
use nast::FunDef;
use nast::FuncBody;
use nast::Gconst;
use nast::ModuleDef;
use nast::Typedef;
use crate::prelude:... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_hint_haccess.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use bitflags::bitflags;
use nast::Class_;
use nast::Contexts;
use nast::Hint;
use nast::Hint_;
use nast::Id;
use nast::WhereConstraint... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_hint_happly.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use hash::HashSet;
use nast::Class_;
use nast::FunDef;
use nast::Gconst;
use nast::Hint;
use nast::Hint_;
use nast::Id;
use nast::Meth... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_hint_hsoft.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Hint;
use nast::Hint_;
use nast::Pos;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct ElabHintHsoftPass;... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_hint_retonly.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Hint;
use nast::Hint_;
use nast::Tprim;
use oxidized::naming_error::ReturnOnlyHint;
use crate::prelude::*;
#[derive(Clone,... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_hint_this.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use bitflags::bitflags;
use nast::ClassHint;
use nast::ClassReq;
use nast::ClassVar;
use nast::Class_;
use nast::ClassishKind;
use nas... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_hint_wildcard.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Contexts;
use nast::Expr_;
use nast::Hint;
use nast::Hint_;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub str... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_hkt.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Class_;
use nast::FunDef;
use nast::Hint;
use nast::Hint_;
use nast::Id;
use nast::Method_;
use nast::Tparam;
use nast::Type... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_shape_field_name.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Class_;
use nast::Expr_;
use nast::ShapeFieldInfo;
use nast::ShapeFieldName;
use crate::prelude::*;
#[derive(Clone, Defaul... |
Rust | hhvm/hphp/hack/src/elab/passes/elab_user_attributes.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use hash::HashMap;
use nast::Id;
use nast::Pos;
use nast::UserAttributes;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub... |
Rust | hhvm/hphp/hack/src/elab/passes/guard_invalid.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Expr_;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct GuardInvalidPass;
impl Pass for GuardInvalidPass... |
Rust | hhvm/hphp/hack/src/elab/passes/remove_memo_attr.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct RemoveMemoAttr {}
impl Pass for RemoveMemoAttr {
fn on_ty_fun_... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_class_consistent_construct.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Class_;
use nast::ClassishKind;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct ValidateClassConsistentC... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_class_member.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Class_;
use nast::Id;
use nast::Pos;
use nast::Sid;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct Vali... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_class_methods.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use hash::HashSet;
use nast::Class_;
use nast::Id;
use nast::Method_;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub str... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_class_req.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::ClassReq;
use nast::Class_;
use nast::ClassishKind;
use nast::Hint;
use nast::RequireKind;
use crate::prelude::*;
#[derive... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_class_tparams.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::ClassTypeconstDef;
use nast::Class_;
use nast::Hint;
use nast::Hint_;
use nast::Id;
use crate::prelude::*;
#[derive(Clone,... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_class_user_attribute_const.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Class_;
use nast::Pos;
use nast::UserAttributes;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct Validat... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_class_var_user_attribute_const.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::ClassVar;
use nast::Pos;
use nast::UserAttributes;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct Valid... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_class_var_user_attribute_lsb.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::ClassVar;
use nast::Id;
use crate::prelude::*;
#[derive(Clone, Default)]
pub struct ValidateClassVarUserAttributeLsbPass {... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_control_context.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Expr_;
use nast::FinallyBlock;
use nast::Stmt;
use nast::Stmt_;
use crate::prelude::*;
#[derive(Copy, Clone)]
enum Control... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_coroutine.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use bitflags::bitflags;
use nast::AsExpr;
use nast::Expr;
use nast::Expr_;
use nast::FunDef;
use nast::FunKind;
use nast::Fun_;
use na... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_dynamic_hint.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Expr_;
use nast::Hint;
use nast::Hint_;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct ValidateDynamicH... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_expr_array_get.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Binop;
use nast::Expr;
use nast::Expr_;
use oxidized::ast_defs::Bop;
use crate::prelude::*;
#[derive(Copy, Clone, Default)... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_expr_call_echo.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::CallExpr;
use nast::Expr;
use nast::Expr_;
use nast::Id;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_expr_cast.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Expr_;
use nast::Hint;
use nast::Hint_;
use nast::Id;
use nast::Tprim::*;
use crate::prelude::*;
#[derive(Clone, Copy, Def... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_expr_function_pointer.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::ClassId;
use nast::ClassId_;
use nast::Class_;
use nast::Expr_;
use nast::Hint;
use nast::Hint_;
use oxidized::ast::Function... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_expr_list.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::AsExpr;
use nast::Binop;
use nast::Expr;
use nast::Expr_;
use nast::Fun_;
use nast::Method_;
use oxidized::ast_defs::Bop;
u... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_fun_params.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::FunParam;
use nast::Fun_;
use nast::Method_;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct ValidateFun... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_fun_param_inout.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::FunDef;
use nast::FunParam;
use nast::Id;
use nast::Method_;
use nast::ParamKind;
use nast::UserAttributes;
use crate::prel... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_global_const.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use file_info::Mode;
use nast::Expr;
use nast::Expr_;
use nast::Gconst;
use nast::Id;
use crate::prelude::*;
#[derive(Clone, Copy, D... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_hint_habstr.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use bitflags::bitflags;
use hash::HashMap;
use nast::Class_;
use nast::FunDef;
use nast::Hint;
use nast::Hint_;
use nast::Method_;
use... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_hint_hrefinement.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::ClassConcreteTypeconst;
use nast::ClassTypeconstDef;
use nast::Expr_;
use nast::Hint;
use nast::Hint_;
use crate::prelude::... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_illegal_name.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::ClassId;
use nast::ClassId_;
use nast::Class_;
use nast::ClassishKind;
use nast::Expr;
use nast::Expr_;
use nast::FunDef;
us... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_interface.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use itertools::FoldWhile;
use itertools::Itertools;
use nast::Class_;
use nast::Hint;
use crate::prelude::*;
#[derive(Clone, Copy, D... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_like_hint.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Hint;
use nast::Hint_;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct ValidateLikeHintPass {}
impl Pas... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_method_private_final.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Class_;
use nast::Method_;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct ValidateMethodPrivateFinalPas... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_module.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::ModuleDef;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct ValidateModulePass;
impl Pass for ValidateMo... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_php_lambda.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Expr;
use nast::Expr_;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct ValidatePhpLambdaPass;
impl Pass... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_shape_name.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Expr;
use nast::Expr_;
use nast::ShapeFieldName;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct Validat... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_supportdyn.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use naming_special_names_rust as sn;
use nast::Hint_;
use nast::Id;
use oxidized::naming_phase_error::ExperimentalFeature;
use crate:... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_trait_internal.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Class_;
use crate::prelude::*;
#[derive(Copy, Clone, Default)]
pub struct ValidateTraitInternalPass;
impl Pass for Valida... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_user_attribute_arity.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::ops::ControlFlow;
use nast::Class_;
use nast::Fun_;
use nast::Method_;
use nast::UserAttribute;
use crate::prelude::*;
#[d... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_user_attribute_deprecated_static.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::ops::ControlFlow;
use nast::Binop;
use nast::Expr;
use nast::Expr_;
use nast::Fun_;
use nast::Method_;
use nast::Pos;
use na... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_user_attribute_dynamically_callable.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::FunDef;
use nast::Method_;
use nast::Pos;
use nast::ReifyKind;
use nast::Tparam;
use nast::UserAttribute;
use nast::Visibili... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_user_attribute_entry_point.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::ops::ControlFlow;
use nast::FunDef;
use crate::prelude::*;
#[derive(Copy, Clone, Default)]
pub struct ValidateUserAttribut... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_user_attribute_infer_flows.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::ops::ControlFlow;
use nast::Fun_;
use nast::Method_;
use nast::UserAttribute;
use crate::prelude::*;
#[derive(Copy, Clone, ... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_user_attribute_memoize.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::ops::ControlFlow;
use nast::FunParam;
use nast::Fun_;
use nast::Method_;
use crate::prelude::*;
#[derive(Copy, Clone, Defau... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_user_attribute_no_auto_dynamic.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::ops::ControlFlow;
use nast::Class_;
use nast::Fun_;
use nast::Method_;
use nast::UserAttribute;
use crate::prelude::*;
#[d... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_user_attribute_soft_internal.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::ops::ControlFlow;
use nast::Class_;
use nast::FunDef;
use nast::Fun_;
use nast::Method_;
use nast::UserAttribute;
use nast::... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_xhp_attribute.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use oxidized::nast::Expr_;
use oxidized::nast::XhpAttribute;
use oxidized::nast::XhpSimple;
use crate::prelude::*;
#[derive(Clone, C... |
Rust | hhvm/hphp/hack/src/elab/passes/validate_xhp_name.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use nast::Hint_;
use nast::Id;
use crate::prelude::*;
#[derive(Clone, Copy, Default)]
pub struct ValidateXhpNamePass;
impl Pass for... |
OCaml | hhvm/hphp/hack/src/errors/contextual_error_formatter.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
open String_utils
let column_width line_number = max 3 (Errors.num_digits line_number)
let line_margin (line_... |
OCaml Interface | hhvm/hphp/hack/src/errors/contextual_error_formatter.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
val to_string : ?claim_color:Tty.raw_color -> Errors.finalized_error -> string |
hhvm/hphp/hack/src/errors/dune | (rule
(target error_message_sentinel.fb.ml)
(action
(copy# facebook/error_message_sentinel.ml error_message_sentinel.fb.ml)))
(library
(name error_codes)
(wrapped false)
(preprocess
(pps ppx_deriving.std))
(modules
error_codes
)
)
(library
(name user_error)
(wrapped false)
(preprocess
(p... | |
OCaml | hhvm/hphp/hack/src/errors/errors.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
type error_code = int
type format =
| Context (** Underlined references and color *)
| Raw (... |
OCaml Interface | hhvm/hphp/hack/src/errors/errors.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type error = (Pos.t, Pos_or_decl.t) User_error.t [@@deriving eq, show]
type finalized_error = (Pos.absolute, Pos.ab... |
Rust | hhvm/hphp/hack/src/errors/errors.rs | // Copyright (c) Meta Platforms, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
mod fmt_plain;
mod fmt_raw;
mod user_error;
use std::io::Write;
pub use fmt_plain::*;
pub use fmt_raw::*;
pub use oxidized::error... |
OCaml | hhvm/hphp/hack/src/errors/error_category.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
module type S = sig
type t [@@deriving enum, show]
val err_code : t -> int
end |
OCaml | hhvm/hphp/hack/src/errors/error_codes.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(*****************************************************************************)
(* Error codes.
* Each error has a ... |
OCaml | hhvm/hphp/hack/src/errors/error_message_sentinel.stubs.ml | (*
* Copyright (c) 2018, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
let remediation_message =
Printf.sprintf
"Addressing other errors or restarting the typechecker with %s might ... |
Rust | hhvm/hphp/hack/src/errors/fmt_plain.rs | // Copyright (c) Meta Platforms, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use oxidized::message::Message;
use oxidized::pos_or_decl::PosOrDecl;
use oxidized::user_error::UserError;
use rc_pos::Pos;
use rel... |
Rust | hhvm/hphp/hack/src/errors/fmt_raw.rs | // Copyright (c) Meta Platforms, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use ansi_term::Color;
use ansi_term::Style;
use oxidized::message::Message;
use oxidized::pos_or_decl::PosOrDecl;
use oxidized::use... |
OCaml | hhvm/hphp/hack/src/errors/highlighted_error_formatter.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
open String_utils
type error_code = int
type marker = int * Tty.raw_color
type marked_message = {
original... |
OCaml Interface | hhvm/hphp/hack/src/errors/highlighted_error_formatter.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
val to_string : Errors.finalized_error -> string |
OCaml | hhvm/hphp/hack/src/errors/markdown_lite.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
type delimiter =
| Backtick
| Asterisk
| DoubleAsterisk
| DoubleTilde
[@@deriving ord]
module Delimit... |
OCaml Interface | hhvm/hphp/hack/src/errors/markdown_lite.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
val render : ?add_bold:bool -> ?color:Tty.raw_color -> string -> string
val md_codify : string -> string
val md_highlight : ... |
OCaml | hhvm/hphp/hack/src/errors/message.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* Trick the Rust generators to use a BStr, because some error
* messages include a Hack string literal, which are not utf8. ... |
OCaml Interface | hhvm/hphp/hack/src/errors/message.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type 'a t = 'a * string [@@deriving eq, ord, show]
val map : 'a t -> f:('a -> 'b) -> 'b t
val get_message_pos : 'a t -> 'a
... |
OCaml | hhvm/hphp/hack/src/errors/phase_error.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
module type S = sig
type t
module Error_code : Error_category.S
val to_user_error : t -> (Pos.t, Pos_or_decl.t) User_e... |
OCaml | hhvm/hphp/hack/src/errors/quickfix.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
type 'pos qf_pos =
(* Normal position. *)
| Qpos of 'pos
(* A quickfix might want to add things to an e... |
OCaml Interface | hhvm/hphp/hack/src/errors/quickfix.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type 'pos t [@@deriving eq, ord, show]
val make : title:string -> new_text:string -> Pos.t -> Pos.t t
val make_with_edits : ... |
OCaml | hhvm/hphp/hack/src/errors/quickfix_ffp.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
module Syntax = Full_fidelity_positioned_syntax
let classish_body_brace_offset s : int option =
let open Sy... |
OCaml Interface | hhvm/hphp/hack/src/errors/quickfix_ffp.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
val classish_starts :
Full_fidelity_positioned_syntax.t ->
Full_fidelity_source_text.t ->
Relative_path.t ->
Pos.t SMa... |
OCaml | hhvm/hphp/hack/src/errors/raw_error_formatter.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
open String_utils
let format_msg file_clr err_clr ((p, s) : Pos.absolute * string) =
let (line, start, end_... |
OCaml Interface | hhvm/hphp/hack/src/errors/raw_error_formatter.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
val to_string : Errors.finalized_error -> string |
OCaml | hhvm/hphp/hack/src/errors/render.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
let strip_ns id =
id |> Utils.strip_ns |> Hh_autoimport.strip_HH_namespace_if_autoimport
let vis_to_string ... |
OCaml Interface | hhvm/hphp/hack/src/errors/render.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
val strip_ns : string -> string
val verb_to_string : [< `extend | `implement | `use ] -> string
val vis_to_string : [< `inter... |
OCaml | hhvm/hphp/hack/src/errors/user_error.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
type ('prim_pos, 'pos) t = {
code: int;
claim: 'prim_pos Message.t;
reasons: 'pos Message.t list;
quic... |
OCaml Interface | hhvm/hphp/hack/src/errors/user_error.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type ('prim_pos, 'pos) t = {
code: int;
claim: 'prim_pos Message.t;
reasons: 'pos Message.t list;
quickfixes: 'prim_pos... |
Rust | hhvm/hphp/hack/src/errors/user_error.rs | // Copyright (c) Meta Platforms, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use oxidized::message::Message;
use oxidized::user_error::UserError;
use rc_pos::Pos;
use relative_path::RelativePathCtx;
use serde... |
TOML | hhvm/hphp/hack/src/errors/cargo/errors/Cargo.toml | # @generated by autocargo
[package]
name = "errors_rs"
version = "0.0.0"
edition = "2021"
[lib]
path = "../../errors.rs"
crate-type = ["lib", "staticlib"]
[dependencies]
ansi_term = "0.12"
oxidized = { version = "0.0.0", path = "../../../oxidized" }
rc_pos = { version = "0.0.0", path = "../../../utils/rust/pos" }
re... |
hhvm/hphp/hack/src/facts/dune | ; FFI OCaml to Rust (../../target/*/librust_facts_ffi.a)
; contains "external" function definition in .ml and
; the symbol is provided by the ocaml-rs Rust package via caml! macro
(data_only_dirs cargo rust_facts_ffi)
(library
(name rust_facts_ffi)
(modules)
(wrapped false)
(foreign_archives rust_facts_ffi))
(ru... | |
OCaml | hhvm/hphp/hack/src/facts/facts.ml | (*
* Copyright (c) 2018, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
module InvStringKey = struct
type t = string
let compare (x : t) (y : t) = String.compare y x
... |
OCaml Interface | hhvm/hphp/hack/src/facts/facts.mli | (*
* Copyright (c) 2018, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
module InvStringKey : Map.OrderedType with type t = string
module InvSMap : WrappedMap.S with type key = InvStringK... |
Rust | hhvm/hphp/hack/src/facts/facts.rs | // Copyright (c) 2019, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::collections::BTreeMap;
use hhbc_string_utils::mangle_xhp_id;
use hhbc_string_utils::strip_global_ns;
use oxidized_by... |
OCaml | hhvm/hphp/hack/src/facts/facts_parser.ml | (*
* Copyright (c) 2018, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
open Facts
let flags_abstract = 1
let flags_final = 2
let extract_as_json_string
~(php5_compa... |
OCaml Interface | hhvm/hphp/hack/src/facts/facts_parser.mli | (*
* Copyright (c) 2018, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
val flags_abstract : int
val flags_final : int
val from_text :
php5_compat_mode:bool ->
hhvm_compat_mode:bool -... |
TOML | hhvm/hphp/hack/src/facts/cargo/facts_rust/Cargo.toml | # @generated by autocargo
[package]
name = "facts_rust"
version = "0.0.0"
edition = "2021"
[lib]
path = "../../facts.rs"
[dependencies]
hhbc_string_utils = { version = "0.0.0", path = "../../../hackc/utils/cargo/hhbc_string_utils" }
oxidized_by_ref = { version = "0.0.0", path = "../../../oxidized_by_ref" }
serde = {... |
TOML | hhvm/hphp/hack/src/facts/cargo/rust_facts_ffi/Cargo.toml | # @generated by autocargo
[package]
name = "rust_facts_ffi"
version = "0.0.0"
edition = "2021"
[lib]
path = "../../rust_facts_ffi/rust_facts_ffi.rs"
test = false
doctest = false
crate-type = ["lib", "staticlib"]
[dependencies]
bumpalo = { version = "3.11.1", features = ["collections"] }
direct_decl_parser = { versio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.