Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Slightly longer doc with justification
Browse files Browse the repository at this point in the history
  • Loading branch information
natebosch committed Oct 5, 2023
1 parent aaa0d0d commit d76f27c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/specs/expression/literal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ part of '../expression.dart';

/// Converts a runtime Dart [literal] value into an [Expression].
///
/// If the [literal] is already an [Expression] it is returned without change.
/// Supported Dart types are translated into literal expressions.
/// If the [literal] is already an [Expression] it is returned without change to
/// allow operating on a collection of mixed simple literals and more complex
/// expressions.
/// Unsupported inputs invoke the [onError] callback.
Expression literal(Object? literal, {Expression Function(Object)? onError}) {
if (literal is Expression) return literal;
Expand Down

0 comments on commit d76f27c

Please sign in to comment.