summaryrefslogtreecommitdiffstats
path: root/init/parser.h
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2017-11-10 12:50:58 -0800
committerSteven Moreland <smoreland@google.com>2017-11-14 13:47:59 -0800
commitb480d441ac092fc855711180023e6292e705e589 (patch)
treeda41ae8bc6c0fe93596cce870ebc6a445a4da461 /init/parser.h
parentb77ecd04d852aacb02eeed20860a498b09d27134 (diff)
downloadsystem_core-b480d441ac092fc855711180023e6292e705e589.tar.gz
system_core-b480d441ac092fc855711180023e6292e705e589.tar.bz2
system_core-b480d441ac092fc855711180023e6292e705e589.zip
Fix out of date SectionParser comment.
It has since been refactored with different return types. Bug: 69050941 Test: boot, init_tests Change-Id: I54c0e6745640136f060ba1876b2f26d95bddc9d6
Diffstat (limited to 'init/parser.h')
-rw-r--r--init/parser.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/init/parser.h b/init/parser.h
index 4ab24a4ee..0da0de547 100644
--- a/init/parser.h
+++ b/init/parser.h
@@ -26,24 +26,22 @@
// SectionParser is an interface that can parse a given 'section' in init.
//
-// You can implement up to 4 functions below, with ParseSection() being mandatory.
-// The first two function return bool with false indicating a failure and has a std::string* err
-// parameter into which an error string can be written. It will be reported along with the
-// filename and line number of where the error occurred.
+// You can implement up to 4 functions below, with ParseSection being mandatory. The first two
+// functions return Result<Success> indicating if they have an error. It will be reported along
+// with the filename and line number of where the error occurred.
//
-// 1) bool ParseSection(std::vector<std::string>&& args, const std::string& filename,
-// int line, std::string* err)
+// 1) ParseSection
// This function is called when a section is first encountered.
//
-// 2) bool ParseLineSection(std::vector<std::string>&& args, int line, std::string* err)
+// 2) ParseLineSection
// This function is called on each subsequent line until the next section is encountered.
//
-// 3) bool EndSection()
+// 3) EndSection
// This function is called either when a new section is found or at the end of the file.
// It indicates that parsing of the current section is complete and any relevant objects should
// be committed.
//
-// 4) bool EndFile()
+// 4) EndFile
// This function is called at the end of the file.
// It indicates that the parsing has completed and any relevant objects should be committed.