cynic_parser/executable/
string_literal.rs1use crate::{
2 AstLookup,
3 common::StringLiteral,
4 executable::{ExecutableId, ids::StringLiteralId},
5};
6
7impl ExecutableId for StringLiteralId {
8 type Reader<'a> = StringLiteral<'a>;
9
10 fn read(self, document: &super::ExecutableDocument) -> Self::Reader<'_> {
11 match self {
12 StringLiteralId::String(id) => StringLiteral::new_string(document.lookup(id)),
13 StringLiteralId::Block(id) => StringLiteral::new_block(document.lookup(id)),
14 }
15 }
16}