From 408af36b7e31877170c9c8448c55ba7d6a7edfde Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Mon, 20 Apr 2020 09:46:49 +0100 Subject: [PATCH] func docs --- boa/src/builtins/function_object.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/boa/src/builtins/function_object.rs b/boa/src/builtins/function_object.rs index 018ea041425..00576cc6358 100644 --- a/boa/src/builtins/function_object.rs +++ b/boa/src/builtins/function_object.rs @@ -34,13 +34,15 @@ pub enum ConstructorKind { Derived, } /// Defines how this references are interpreted within the formal parameters and code body of the function. +/// +/// Arrow functions don't define a `this` and thus are lexical, `function`s do define a this and thus are NonLexical #[derive(Debug, Copy, Clone)] pub enum ThisMode { Lexical, NonLexical, } -/// FunctionBody is Boa specific, it will either be Rust code or JavaScript code (Block Node) +/// FunctionBody is specific to this interpreter, it will either be Rust code or JavaScript code (AST Node) #[derive(Clone)] pub enum FunctionBody { BuiltIn(NativeFunctionData),