Skip to content

Instantly share code, notes, and snippets.

@jasonwilliams
Created October 8, 2019 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jasonwilliams/50eb16903b0d5cacfc14d94a4f505471 to your computer and use it in GitHub Desktop.
Save jasonwilliams/50eb16903b0d5cacfc14d94a4f505471 to your computer and use it in GitHub Desktop.
Function Object start
use crate::environment::lexical_environment::Environment;
use crate::js::value::ValueData;
use crate::syntax::ast::expr::Expr;
/// Sets the functionKind
#[derive(Debug, Copy, Clone)]
pub enum FunctionKind {
Normal,
ClassConstructor,
Generator,
Async,
AsyncGenerator,
}
/// Sets the ConstructorKind
#[derive(Debug, Copy, Clone)]
pub enum ConstructorKind {
Base,
Derived,
}
/// Defines how this references are interpreted within the formal parameters and code body of the function.
#[derive(Debug, Copy, Clone)]
pub enum ThisMode {
Lexical,
Strict,
Global,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment