Home
last modified time | relevance | path

Searched refs:CodeWriter (Results 1 – 25 of 69) sorted by relevance

123

/external/rust/crates/protobuf-codegen/2.27.1/src/
Dcode_writer.rs15 pub struct CodeWriter<'a> { struct
20 impl<'a> CodeWriter<'a> { argument
21 pub fn new(writer: &'a mut dyn Write) -> CodeWriter<'a> { in new()
22 CodeWriter { in new()
85 F: Fn(&mut CodeWriter), in indented() argument
87 cb(&mut CodeWriter { in indented()
96 F: Fn(&mut CodeWriter), in commented() argument
98 cb(&mut CodeWriter { in commented()
120 F: Fn(&mut CodeWriter), in lazy_static_decl_get() argument
141 F: Fn(&mut CodeWriter), in block() argument
[all …]
Dmessage.rs132 fn write_match_each_oneof_variant<F>(&self, w: &mut CodeWriter, cb: F) in write_match_each_oneof_variant() argument
134 F: Fn(&mut CodeWriter, &OneofVariantGen, &str, &RustType), in write_match_each_oneof_variant() argument
159 fn write_write_to_with_cached_sizes(&self, w: &mut CodeWriter) { in write_write_to_with_cached_sizes() argument
178 fn write_get_cached_size(&self, w: &mut CodeWriter) { in write_get_cached_size() argument
184 fn write_default_instance(&self, w: &mut CodeWriter) { in write_default_instance() argument
198 fn write_compute_size(&self, w: &mut CodeWriter) { in write_compute_size() argument
223 fn write_field_accessors(&self, w: &mut CodeWriter) { in write_field_accessors() argument
233 fn write_impl_self(&self, w: &mut CodeWriter) { in write_impl_self() argument
244 fn write_unknown_fields(&self, w: &mut CodeWriter) { in write_unknown_fields() argument
266 fn write_merge_from(&self, w: &mut CodeWriter) { in write_merge_from() argument
[all …]
Denums.rs12 use CodeWriter;
147 pub fn write(&self, w: &mut CodeWriter) { in write() argument
165 fn write_struct(&self, w: &mut CodeWriter) { in write_struct() argument
208 fn write_fn_value(&self, w: &mut CodeWriter) { in write_fn_value() argument
222 fn write_impl_enum(&self, w: &mut CodeWriter) { in write_impl_enum() argument
297 fn write_impl_value(&self, w: &mut CodeWriter) { in write_impl_value() argument
322 fn write_impl_copy(&self, w: &mut CodeWriter) { in write_impl_copy() argument
326 fn write_impl_eq(&self, w: &mut CodeWriter) { in write_impl_eq() argument
343 fn write_impl_hash(&self, w: &mut CodeWriter) { in write_impl_hash() argument
355 fn write_impl_default(&self, w: &mut CodeWriter) { in write_impl_default() argument
Dextensions.rs8 use super::code_writer::CodeWriter;
60 fn write(&self, w: &mut CodeWriter) { in write() argument
91 w: &mut CodeWriter, in write_extensions() argument
Dserde.rs1 use code_writer::CodeWriter;
5 pub fn write_serde_attr(w: &mut CodeWriter, customize: &Customize, attr: &str) { in write_serde_attr() argument
/external/rust/crates/protobuf-codegen/src/gen/
Dcode_writer.rs12 pub(crate) struct CodeWriter<'a> { struct
17 impl<'a> CodeWriter<'a> { implementation
18 pub(crate) fn new(writer: &'a mut String) -> CodeWriter<'a> { in new()
19 CodeWriter { in new()
25 pub(crate) fn with_no_error(f: impl FnOnce(&mut CodeWriter)) -> String { in with_no_error()
31 F: FnOnce(&mut CodeWriter) -> anyhow::Result<()>, in with()
38 F: FnOnce(&mut CodeWriter) -> Result<(), E>, in with_impl()
42 let mut cw = CodeWriter::new(&mut writer); in with_impl()
105 F: FnOnce(&mut CodeWriter), in indented() argument
107 cb(&mut CodeWriter { in indented()
[all …]
Dprotoc_insertion_point.rs7 use crate::gen::code_writer::CodeWriter;
14 fn write_protoc_insertion_point(w: &mut CodeWriter, customize: &Customize, arg: &str) { in write_protoc_insertion_point() argument
22 w: &mut CodeWriter, in write_protoc_insertion_point_for_message() argument
30 w: &mut CodeWriter, in write_protoc_insertion_point_for_field() argument
38 w: &mut CodeWriter, in write_protoc_insertion_point_for_special_field() argument
51 w: &mut CodeWriter, in write_protoc_insertion_point_for_enum() argument
59 w: &mut CodeWriter, in write_protoc_insertion_point_for_enum_value() argument
67 w: &mut CodeWriter, in write_protoc_insertion_point_for_oneof() argument
75 w: &mut CodeWriter, in write_protoc_insertion_point_for_oneof_field() argument
Denums.rs7 use crate::gen::code_writer::CodeWriter;
125 pub fn write(&self, w: &mut CodeWriter) { in write() argument
145 fn write_impl_self(&self, w: &mut CodeWriter) { in write_impl_self() argument
153 fn write_enum(&self, w: &mut CodeWriter) { in write_enum() argument
200 fn write_impl_enum_fn_value(&self, w: &mut CodeWriter) { in write_impl_enum_fn_value() argument
217 fn write_impl_enum_const_name(&self, w: &mut CodeWriter) { in write_impl_enum_const_name() argument
224 fn write_impl_enum_fn_from_i32(&self, w: &mut CodeWriter) { in write_impl_enum_fn_from_i32() argument
246 fn write_impl_enum_const_values(&self, w: &mut CodeWriter) { in write_impl_enum_const_values() argument
256 fn write_impl_enum(&self, w: &mut CodeWriter) { in write_impl_enum() argument
272 fn write_impl_enum_full(&self, w: &mut CodeWriter) { in write_impl_enum_full() argument
[all …]
Dmessage.rs193 fn write_match_each_oneof_variant<F>(&self, w: &mut CodeWriter, cb: F) in write_match_each_oneof_variant() argument
195 F: Fn(&mut CodeWriter, &OneofVariantGen, &RustValueTyped), in write_match_each_oneof_variant() argument
237 fn write_write_to_with_cached_sizes(&self, w: &mut CodeWriter) { in write_write_to_with_cached_sizes() argument
257 fn write_default_instance_lazy(&self, w: &mut CodeWriter) { in write_default_instance_lazy() argument
266 fn write_default_instance_static(&self, w: &mut CodeWriter) { in write_default_instance_static() argument
296 fn write_default_instance(&self, w: &mut CodeWriter) { in write_default_instance() argument
313 fn write_compute_size(&self, w: &mut CodeWriter) { in write_compute_size() argument
340 fn write_field_accessors(&self, w: &mut CodeWriter) { in write_field_accessors() argument
346 fn write_impl_self(&self, w: &mut CodeWriter) { in write_impl_self() argument
361 fn write_unknown_fields(&self, w: &mut CodeWriter) { in write_unknown_fields() argument
[all …]
Doneof.rs12 use crate::gen::code_writer::CodeWriter;
252 fn write_enum(&self, w: &mut CodeWriter) { in write_enum() argument
275 fn write_impl_oneof(&self, w: &mut CodeWriter) { in write_impl_oneof() argument
285 fn write_impl_oneof_full_fn_descriptor(&self, w: &mut CodeWriter) { in write_impl_oneof_full_fn_descriptor() argument
318 fn write_impl_oneof_full(&self, w: &mut CodeWriter) { in write_impl_oneof_full() argument
329 fn write_generated_oneof_descriptor_data(&self, w: &mut CodeWriter) { in write_generated_oneof_descriptor_data() argument
354 fn write_impl_self(&self, w: &mut CodeWriter) { in write_impl_self() argument
362 pub fn write(&self, w: &mut CodeWriter) { in write() argument
Dfile_descriptor.rs6 use crate::gen::code_writer::CodeWriter;
37 w: &mut CodeWriter, in write_generate_file_descriptor() argument
93 w: &mut CodeWriter, in write_file_descriptor() argument
136 w: &mut CodeWriter, in write_file_descriptor_data() argument
173 fn write_file_descriptor_proto(customize: &Customize, w: &mut CodeWriter) { in write_file_descriptor_proto() argument
Dmod_rs.rs2 use crate::gen::code_writer::CodeWriter;
5 let v = CodeWriter::with_no_error(|w| { in gen_mod_rs()
Dextensions.rs7 use crate::gen::code_writer::CodeWriter;
72 fn write(&self, w: &mut CodeWriter) { in write() argument
102 w: &mut CodeWriter, in write_extensions() argument
/external/tflite-support/tensorflow_lite_support/codegen/
Dutils.cc49 CodeWriter::CodeWriter(ErrorReporter* err) : indent_(0), err_(err) {} in CodeWriter() function in tflite::support::codegen::CodeWriter
51 void CodeWriter::SetTokenValue(const std::string& token, in SetTokenValue()
56 const std::string CodeWriter::GetTokenValue(const std::string& token) const { in GetTokenValue()
68 void CodeWriter::SetIndentString(const std::string& indent_str) { in SetIndentString()
72 void CodeWriter::Indent() { indent_++; } in Indent()
74 void CodeWriter::Outdent() { indent_--; } in Outdent()
76 std::string CodeWriter::GenerateIndent() const { in GenerateIndent()
85 void CodeWriter::Append(const std::string& text) { AppendInternal(text, true); } in Append()
87 void CodeWriter::AppendNoNewLine(const std::string& text) { in AppendNoNewLine()
91 void CodeWriter::AppendInternal(const std::string& text, bool newline) { in AppendInternal()
[all …]
Dandroid_java_generator.cc66 AsBlock(CodeWriter* code_writer, const std::string& before, in AsBlock()
82 CodeWriter* code_writer_;
88 bool GenerateWrapperClass(CodeWriter*, const ModelInfo&, ErrorReporter*);
89 bool GenerateWrapperImports(CodeWriter*, const ModelInfo&, ErrorReporter*);
90 bool GenerateWrapperInputs(CodeWriter*, const ModelInfo&, ErrorReporter*);
91 bool GenerateWrapperOutputs(CodeWriter*, const ModelInfo&, ErrorReporter*);
92 bool GenerateWrapperMetadata(CodeWriter*, const ModelInfo&, ErrorReporter*);
93 bool GenerateWrapperAPI(CodeWriter*, const ModelInfo&, ErrorReporter*);
214 void SetCodeWriterWithTensorInfo(CodeWriter* code_writer, in SetCodeWriterWithTensorInfo()
234 void SetCodeWriterWithModelInfo(CodeWriter* code_writer, in SetCodeWriterWithModelInfo()
[all …]
Dutils_test.cc34 CodeWriter writer(&err); in TEST()
48 CodeWriter writer(&err); in TEST()
58 CodeWriter writer(&err); in TEST()
68 CodeWriter writer(&err); in TEST()
/external/rust/crates/grpcio-compiler/src/
Dcodegen.rs31 struct CodeWriter<'a> { struct
36 impl<'a> CodeWriter<'a> { implementation
37 pub fn new(writer: &'a mut dyn Write) -> CodeWriter<'a> { in new()
38 CodeWriter { in new()
82 F: Fn(&mut CodeWriter), in indented() argument
84 cb(&mut CodeWriter { in indented()
93 F: Fn(&mut CodeWriter), in commented() argument
95 cb(&mut CodeWriter { in commented()
103 F: Fn(&mut CodeWriter), in block() argument
112 F: Fn(&mut CodeWriter), in expr_block() argument
[all …]
/external/javapoet/src/main/java/com/squareup/javapoet/
DArrayTypeName.java50 @Override CodeWriter emit(CodeWriter out) throws IOException { in emit()
54 CodeWriter emit(CodeWriter out, boolean varargs) throws IOException { in emit()
59 private CodeWriter emitLeafType(CodeWriter out) throws IOException { in emitLeafType()
66 private CodeWriter emitBrackets(CodeWriter out, boolean varargs) throws IOException { in emitBrackets()
DCodeWriter.java43 final class CodeWriter { class
71 CodeWriter(Appendable out) { in CodeWriter() method in CodeWriter
75 CodeWriter(Appendable out, String indent, Set<String> staticImports, Set<String> alwaysQualify) { in CodeWriter() method in CodeWriter
79 CodeWriter(Appendable out, in CodeWriter() method in CodeWriter
99 public CodeWriter indent() { in indent()
103 public CodeWriter indent(int levels) { in indent()
108 public CodeWriter unindent() { in unindent()
112 public CodeWriter unindent(int levels) { in unindent()
118 public CodeWriter pushPackage(String packageName) { in pushPackage()
124 public CodeWriter popPackage() { in popPackage()
[all …]
DTypeName.java211 CodeWriter codeWriter = new CodeWriter(resultBuilder); in toString()
222 CodeWriter emit(CodeWriter out) throws IOException { in emit()
232 CodeWriter emitAnnotations(CodeWriter out) throws IOException { in emitAnnotations()
/external/rust/crates/protobuf-codegen/src/gen/field/
Dmod.rs22 use crate::gen::code_writer::CodeWriter;
486 pub(crate) fn write_clear(&self, w: &mut CodeWriter) { in write_clear() argument
513 w: &mut CodeWriter, in write_write_element() argument
571 pub(crate) fn write_struct_field(&self, w: &mut CodeWriter) { in write_struct_field() argument
594 fn write_if_let_self_field_is_some<F>(&self, s: &SingularField, w: &mut CodeWriter, cb: F) in write_if_let_self_field_is_some() argument
596 F: Fn(&RustValueTyped, &mut CodeWriter), in write_if_let_self_field_is_some() argument
683 pub(crate) fn write_if_self_field_is_none<F>(&self, w: &mut CodeWriter, cb: F) in write_if_self_field_is_none() argument
685 F: Fn(&mut CodeWriter), in write_if_self_field_is_none() argument
692 pub(crate) fn write_for_self_field<F>(&self, w: &mut CodeWriter, varn: &str, cb: F) in write_for_self_field() argument
694 F: Fn(&mut CodeWriter, &RustType), in write_for_self_field() argument
[all …]
Daccessor.rs1 use crate::gen::code_writer::CodeWriter;
91 let getter = CodeWriter::with_no_error(|w| { in accessor_fn_oneof_enum()
107 let setter = CodeWriter::with_no_error(|w| { in accessor_fn_oneof_enum()
217 pub fn write_push_accessor(&self, fields_var: &str, w: &mut CodeWriter) { in write_push_accessor() argument
/external/flatbuffers/src/
Didl_gen_kotlin.cpp87 CodeWriter enumWriter(ident_pad); in generate()
101 CodeWriter structWriter(ident_pad); in generate()
270 void GenEnum(EnumDef &enum_def, CodeWriter &writer) const { in GenEnum()
399 void GenStructArgs(const StructDef &struct_def, CodeWriter &writer, in GenStructArgs()
422 void GenStructBody(const StructDef &struct_def, CodeWriter &writer, in GenStructBody()
467 void GenStruct(StructDef &struct_def, CodeWriter &writer, in GenStruct()
561 CodeWriter &writer, const IDLOptions options) const { in GenerateLookupByKey()
623 CodeWriter &writer, in GenerateFinishSizePrefixed()
636 CodeWriter &writer, in GenerateFinishStructBuffer()
648 void GenerateEndStructMethod(StructDef &struct_def, CodeWriter &writer, in GenerateEndStructMethod()
[all …]
/external/rust/crates/protobuf-codegen/2.27.1/src/field/
Dmod.rs21 use super::code_writer::CodeWriter;
925 pub fn write_clear(&self, w: &mut CodeWriter) { in write_clear() argument
999 pub fn write_write_element(&self, w: &mut CodeWriter, os: &str, var: &str, ty: &RustType) { in write_write_element() argument
1079 fn write_if_let_self_field_is_some<F>(&self, w: &mut CodeWriter, cb: F) in write_if_let_self_field_is_some() argument
1081 F: Fn(&str, &RustType, &mut CodeWriter), in write_if_let_self_field_is_some() argument
1131 fn write_if_self_field_is_not_empty<F>(&self, w: &mut CodeWriter, cb: F) in write_if_self_field_is_not_empty() argument
1133 F: Fn(&mut CodeWriter), in write_if_self_field_is_not_empty() argument
1140 pub fn write_if_self_field_is_none<F>(&self, w: &mut CodeWriter, cb: F) in write_if_self_field_is_none() argument
1142 F: Fn(&mut CodeWriter), in write_if_self_field_is_none() argument
1149 pub fn write_for_self_field<F>(&self, w: &mut CodeWriter, varn: &str, cb: F) in write_for_self_field() argument
[all …]
/external/kotlinpoet/kotlinpoet/src/main/java/com/squareup/kotlinpoet/
DCodeWriter.kt36 internal inline fun buildCodeString(builderAction: CodeWriter.() -> Unit): String { in buildCodeString()
38 CodeWriter(stringBuilder, columnLimit = Integer.MAX_VALUE).use { in buildCodeString()
45 codeWriter: CodeWriter, in buildCodeString()
46 builderAction: CodeWriter.() -> Unit, in buildCodeString()
57 internal class CodeWriter constructor( class
269 arg.toString(this@CodeWriter) in emitCode()
671 inline fun emitInto(out: Appendable, action: CodeWriter.() -> Unit) { in emitInto()
694 emitStep: (importsCollector: CodeWriter) -> Unit, in withCollectedImports()
695 ): CodeWriter { in withCollectedImports()
697 val importsCollector = CodeWriter( in withCollectedImports()
[all …]

123